numa_maps 0.1.0

Parse the numa_maps file
Documentation
  • Coverage
  • 100%
    25 out of 25 items documented1 out of 8 items with examples
  • Size
  • Source code size: 32.35 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.2 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • antiguru/numa_maps
    2 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • antiguru

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