pub fn rss(pid: Option<Pid>) -> Result<u64, MemError>Expand description
Returns the resident set size of the supplied pid in bytes. If no pid is supplied, the resident set size of the current process is returned.
§Examples
use kwik::sys::mem;
// returns the resident set size of the current process
match mem::rss(None) {
Ok(value) => {
// process resident set size
},
Err(err) => {
// handle error
}
}§Errors
This function returns an error if the resident set size could not be determined.