-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/proc/sysvipc/shm #154
/proc/sysvipc/shm #154
Conversation
let mut vec = Vec::new(); | ||
|
||
// See printing code here: | ||
// https://elixir.bootlin.com/linux/latest/source/ipc/shm.c#L1737 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for including this reference. Having comments like this are always helpful
With a quick skim, this looks OK to me. I would be nice to have all the fields of |
I added doc for every items, hopefully it's correct! |
Can you rebase this on top of the latest |
What do you think is left for the PR? Is it still a "WIP" ? |
I fixed some comments in the example file, I think this PR is finished. You can merge it if it's good for you. |
Err(_) => continue, | ||
} | ||
} | ||
println!(""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use println!();
instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clippy::println_empty_string
@@ -0,0 +1,33 @@ | |||
#![allow(clippy::print_literal)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this line
Ok(memory_maps) => { | ||
for (memory_map, memory_map_data) in &memory_maps { | ||
match memory_map.pathname { | ||
procfs::process::MMapPath::Vsys(key) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enum variant MMapPath::Vsys
not found?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MMapPath::Vsys compile error(not found)
origin /~https://github.com/tatref/procfs.git (fetch)
origin /~https://github.com/tatref/procfs.git (push)
commit a0679242e613e4618cb92a0ed70721af218efa7d (HEAD -> sysvipc_shm, origin/sysvipc_shm)
Author: tatref <tatref@users.noreply.github.com>
Date: Sat Nov 6 19:13:11 2021 +0100
Update shm.rs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you're missing #151
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I rebased this PR from current master
I think you should squash five commit to one commit |
Thanks! |
This is related to my last commit to add /SYSV paths to the memory maps (#151)
Output of the example:
I check with Oracle databases that make huge usage of shared memory, it works as expected.
This PR seems good to me, but I wouldn't mind somebody else checking the types of the fields in the
Shm
struct as I'm not very fluent in C.I'll also try add comments to theses fields