SPC q q- quitSPC w /- split window verticallySPC w- - split window horizontallySPC 1- switch to window 1SPC 2- switch to window 2SPC w c- delete current windowSPC TAB- switch to previous bufferSPC b b- switch buffers
| int wait_size = 5; // maximum number of waiting clients | |
| if (listen(listen_sock, wait_size) < 0) { | |
| printf("could not open socket for listening\n"); | |
| return 1; | |
| } |
For some situations, understanding system calls made during processes start-up and shut-down can be valuable. For example, consider a shell-scripts long-running hot loop that runs a very short-running process. Thus it is perhaps reasonable to hypothesise that a difference in system calls during process start-up/shut-down has a non-negligable impact on the run time of said hot-loop.
This write-up looks at how C and Rust programs differ in terms of system-calls for start-up/shutdown. It is not intended as a performance analysis and only looks at one target system.
At the end, we take a quick look at using statically linked libraries by building with # cargo build --target x86_64-unknown-linux-musl --release and removing even more syscalls by removing the main function
| use seed::{prelude::*, *}; | |
| use serde::{Deserialize, Serialize}; | |
| fn init(_: Url, orders: &mut impl Orders<Message>) -> Model { | |
| log!("I N I T I A L I Z E"); | |
| // orders.subscribe(Message::UrlChanged); | |
| // orders.send_msg(Message::GoToUrl(Url::new().set_path(&["login"]))); | |
| Model::default() | |
| } |