Skip to main content

snapshot

Function snapshot 

Source
pub fn snapshot() -> Result<Memory>
Expand description

Every memory value from one set of reads, swap included. A caller who wants several values calls this once.

use sys_lib as sys;

let m = sys::mem::snapshot()?;
println!("{} free of {} (host {} of {}), source {:?}", m.free, m.total, m.host_free, m.host_total, m.source);
if let Some(limit) = m.limit {
    println!("limit {} from {:?}, throttles at {:?}", limit.hard, limit.source, limit.soft);
}

ยงErrors

As total.