Skip to main content

resident_set_bytes

Function resident_set_bytes 

Source
pub fn resident_set_bytes() -> Option<u64>
Expand description

Returns the current process resident set size (RSS) in bytes, best-effort.

  • Linux: 2nd field (resident pages) of /proc/self/statm × page size.
  • macOS: mach task_info(MACH_TASK_BASIC_INFO) .resident_size.
  • Other targets: None.

Returns None on any error; never panics.