pub struct Shm {}
Expand description
A shared memory segment parsed from /proc/sysvipc/shm
Relation with [crate::process::process::MMapPath::Vsys]
Fields
key: i32
Segment key
shmid: u64
Segment ID, unique
perms: u16
Access permissions, as octal
size: u32
Size in bytes
cpid: i32
Creator PID
lpid: i32
Last operator PID
nattch: u32
Number of attached processes
uid: u16
User ID
gid: u16
Group ID
cuid: u16
Creator UID
cgid: u16
Creator GID
atime: u64
Time of last shmat
(attach), epoch
dtime: u64
Time of last shmdt
(detach), epoch
ctime: u64
Time of last permission change, epoch
rss: u64
Current part of the shared memory resident in memory
swap: u64
Current part of the shared memory in SWAP
Implementations
sourceimpl Shm
impl Shm
sourcepub fn new() -> ProcResult<Vec<Shm>>
pub fn new() -> ProcResult<Vec<Shm>>
Reads and parses the /proc/sysvipc/shm
, returning an error if there are problems.
sourcepub fn from_reader<R: Read>(r: R) -> ProcResult<Vec<Shm>>
pub fn from_reader<R: Read>(r: R) -> ProcResult<Vec<Shm>>
Get Meminfo from a custom Read instead of the default /proc/sysvipc/shm
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Shm
impl Send for Shm
impl Sync for Shm
impl Unpin for Shm
impl UnwindSafe for Shm
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more