Skip to main content

res

Function res 

Source
pub fn res() -> Result<usize>
Expand description

Returns the process’s resident memory size in bytes, or zero outside Linux.

The value is the second field of Linux /proc/self/statm, scaled by the system page size. It is sampled separately from the other memory fields.

§Panics

On Linux, panics if statm is malformed, exceeds parser capacity, or lacks the requested field. Panics if converting that page count overflows usize bytes.