Skip to content

Commit

Permalink
Merge pull request #237 from afranchuk/expose-memory-map-parsing
Browse files Browse the repository at this point in the history
Refactor and expose memory map processing.
  • Loading branch information
eminence authored Feb 1, 2023
2 parents 0111656 + 489b7e1 commit 9b6f434
Show file tree
Hide file tree
Showing 4 changed files with 254 additions and 192 deletions.
2 changes: 1 addition & 1 deletion examples/shm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fn main() {
let prc = prc.unwrap();
match prc.smaps() {
Ok(memory_maps) => {
for (memory_map, _memory_map_data) in &memory_maps {
for memory_map in &memory_maps {
if let procfs::process::MMapPath::Vsys(key) = memory_map.pathname {
if key == shared_memory.key && memory_map.inode == shared_memory.shmid {
println!("{}: {:?}", prc.pid, prc.cmdline().unwrap());
Expand Down
Loading

0 comments on commit 9b6f434

Please sign in to comment.