Skip to content

Commit 33b9356

Browse files
authored
Merge pull request #2 from antiguru/productize
2 parents 73a5109 + 9d53de7 commit 33b9356

File tree

4 files changed

+114
-66
lines changed

4 files changed

+114
-66
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ jobs:
1010
os:
1111
- ubuntu
1212
- macos
13+
- windows
1314
toolchain:
1415
- stable
1516
- 1.72

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "numa_maps"
3-
version = "0.0.0"
3+
version = "0.1.0"
44
edition = "2021"
55
authors = ["Moritz Hoffmann <antiguru@gmail.com>"]
66
description = "Parse the numa_maps file"

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,23 @@ numa_maps = "0.1"
1111
## Example
1212

1313
```rust
14+
#[cfg(target_os = "linux")]
15+
let map = numa_maps::NumaMap::from_file("/proc/self/numa_maps").unwrap();
16+
#[cfg(not(target_os = "linux"))]
17+
let map = numa_maps::NumaMap::default();
18+
19+
for region in &map.ranges {
20+
println!("base: {:x} -> {:?}", region.address, region.properties);
21+
}
22+
1423
```
1524

25+
## Description
26+
27+
`numa_maps` provides a simple API to read the contents of the `numa_maps` file.
28+
It parses the file into ranges with a base address, a policy, and a list of
29+
properties.
30+
1631
#### License
1732

1833
<sup>

0 commit comments

Comments
 (0)