pub struct MemoryCapacity {
pub physical_bytes: Option<u64>,
pub available_bytes: Option<u64>,
pub limit_bytes: Option<u64>,
pub limit_source: &'static str,
pub used_in_limit_bytes: Option<u64>,
pub charged_in_limit_bytes: Option<u64>,
}Expand description
The machine’s memory and this process’s limit. Unavailable figures are None.
Fields§
§physical_bytes: Option<u64>Physical memory installed.
available_bytes: Option<u64>Memory available without paging: MemAvailable on Linux, free plus inactive plus
purgeable pages on macOS, ullAvailPhys on Windows, what the app may still allocate on iOS.
limit_bytes: Option<u64>The lowest of a cgroup or job limit and the physical total.
limit_source: &'static strWhat set limit_bytes: cgroup-v2, cgroup-v1, job, app (the per-app limit on
iOS) or physical.
used_in_limit_bytes: Option<u64>The working set under a cgroup limit (CgroupMemory::working_set_bytes); None for
physical and job limits.
charged_in_limit_bytes: Option<u64>What the kernel charges against a cgroup limit, file page cache included.
Implementations§
Trait Implementations§
Source§impl Clone for MemoryCapacity
impl Clone for MemoryCapacity
impl Copy for MemoryCapacity
Source§impl Debug for MemoryCapacity
impl Debug for MemoryCapacity
Source§impl Default for MemoryCapacity
impl Default for MemoryCapacity
impl Eq for MemoryCapacity
Source§impl PartialEq for MemoryCapacity
impl PartialEq for MemoryCapacity
impl StructuralPartialEq for MemoryCapacity
Auto Trait Implementations§
impl Forget for MemoryCapacity
impl Freeze for MemoryCapacity
impl Move for MemoryCapacity
impl RefUnwindSafe for MemoryCapacity
impl Send for MemoryCapacity
impl Sync for MemoryCapacity
impl Unpin for MemoryCapacity
impl UnsafeUnpin for MemoryCapacitywhere
&'static str: UnsafeUnpin,
impl UnwindSafe for MemoryCapacitywhere
&'static str: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more