Skip to content

Rust library to read `/proc/$/numa_maps`

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

antiguru/numa_maps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

numa_maps

A simple library to read the numa_maps file on Linux.

[dependencies]
numa_maps = "0.1"

Example

#[cfg(target_os = "linux")]
let map = numa_maps::NumaMap::from_file("/proc/self/numa_maps").unwrap();
#[cfg(not(target_os = "linux"))]
let map = numa_maps::NumaMap::default();

for region in &map.ranges {
    println!("base: {:x} -> {:?}", region.address, region.properties);
}

Description

numa_maps provides a simple API to read the contents of the numa_maps file. It parses the file into ranges with a base address, a policy, and a list of properties.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

Rust library to read `/proc/$/numa_maps`

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages