pub struct RAM {Show 57 fields
pub total: Size,
pub free: Size,
pub available: Size,
pub buffers: Size,
pub cached: Size,
pub swap_cached: Size,
pub active: Size,
pub inactive: Size,
pub active_anon: Size,
pub inactive_anon: Size,
pub active_file: Size,
pub inactive_file: Size,
pub unevictable: Size,
pub mlocked: Size,
pub swap_total: Size,
pub swap_free: Size,
pub zswap: Size,
pub zswapped: Size,
pub dirty: Size,
pub writeback: Size,
pub anon_pages: Size,
pub mapped: Size,
pub shmem: Size,
pub kreclaimable: Size,
pub slab: Size,
pub sreclaimable: Size,
pub sunreclaim: Size,
pub kernel_stack: Size,
pub page_tables: Size,
pub sec_page_tables: Size,
pub nfs_unstable: Size,
pub bounce: Size,
pub writeback_tmp: Size,
pub commit_limit: Size,
pub commited_as: Size,
pub vmalloc_total: Size,
pub vmalloc_used: Size,
pub vmalloc_chunk: Size,
pub percpu: Size,
pub hardware_corrupted: Size,
pub anon_huge_pages: Size,
pub shmem_huge_pages: Size,
pub shmem_pmd_mapped: Size,
pub cma_total: Option<Size>,
pub cma_free: Option<Size>,
pub file_huge_pages: Size,
pub file_pmd_mapped: Size,
pub unaccepted: Size,
pub huge_pages_total: u32,
pub huge_pages_free: u32,
pub huge_pages_rsvd: u32,
pub huge_pages_surp: u32,
pub huge_page_size: Size,
pub huge_tlb: Size,
pub direct_map_4k: Size,
pub direct_map_2m: Size,
pub direct_map_1g: Size,
}Expand description
A structure containing data from the /proc/meminfo file
Fields§
§total: SizeTotal usable physical RAM (excludes reserved/firmware memory)
free: SizeCompletely unused physical RAM. Often misleadingly low due to caching
available: SizeBest estimate of memory available for new apps (accounts for caches/reclaimable memory)
buffers: SizeTemporary storage for raw disk blocks (e.g. filesystem metadata)
cached: SizePage cache for files read from disk (reclaimed when apps need memory)
swap_cached: SizeMemory swapped out but later accessed, now present in both RAM and swap
active: SizeRecently used memory (harder to reclaim)
inactive: SizeLess recently used memory (eased to reclaim)
active_anon: SizeActive anonymous pages (e.g. heap/stack, not file-backed)
inactive_anon: SizeInactive anonymous pages
active_file: SizeActive file-backed pages (cached files)
inactive_file: SizeInactive file-backed pages
unevictable: SizeMemory that cannot be pages out (e.g. locked with mlock())
mlocked: SizeMemory that is locked (cannot be swapped out)
swap_total: SizeTotal amount of swap space available
swap_free: SizeAmount of swap space that is currently unused
zswap: Size§zswapped: Size§dirty: SizeData waiting to be written to disk
writeback: SizeData actively being written to disk
anon_pages: SizeNon file-backed pages mapped into user-space page tables
mapped: SizeFiles (like libraries) that have been mapped into memory
(also includes tmpfs/shmem)
shmem: SizeTotal memory used by shared memory (shmem) and tmpfs
kreclaimable: SizeKernel allocations that the kernel will attempt to reclaim
under memory pressure (includes SReclaimable and other
reclaimable slabs)
slab: SizeIn-kernel data structures cache (includes SReclaimable and
SUnreclaim)
sreclaimable: SizePart of Slab that might be reclaimed, such as caches for
directory inodes, etc.
sunreclaim: SizePart of Slab that cannot be reclaimed
kernel_stack: SizeMemory used by kernel stacks
page_tables: SizeMemory used by page tables (to map virtual to physical addresses)
sec_page_tables: Size§nfs_unstable: SizeMemory that has been sent to the NFS server but not yet committed to stable storage
bounce: SizeMemory used for block device bounce buffers (rarely used on modern systems)
writeback_tmp: SizeMemory used by FUSE for temporary writeback buffers
commit_limit: SizeBased on the overcommit ratio, this is the total amount of memory currently available to be allocated
commited_as: Sizehe amount of memory currently allocated by the system. The kernel may overcommit this
vmalloc_total: SizeTotal size of vmalloc memory area
vmalloc_used: SizeAmount of vmalloc area which is used
vmalloc_chunk: SizeLargest contiguous block of free vmalloc space
percpu: SizeMemory used for per-cpu allocations (each CPU has its own block)
hardware_corrupted: SizeMemory that the kernel identified as corrupted (when
CONFIG_MEMORY_FAILURE is enabled)
anon_huge_pages: SizeNon-file backed huge pages mapped into user-space page tables (transparent hugepages)
shmem_huge_pages: SizeHuge pages used by shared memory (shmem) and tmpfs.
shmem_pmd_mapped: Sizeshmem/tmpfs memory that is mapped into user space with
huge pages
cma_total: Option<Size>Total CMA (Contiguous Memory Allocator) area
cma_free: Option<Size>Free memory in the CMA area
file_huge_pages: Size§file_pmd_mapped: Size§unaccepted: Size§huge_pages_total: u32§huge_pages_free: u32§huge_pages_rsvd: u32§huge_pages_surp: u32§huge_page_size: Size§huge_tlb: Size§direct_map_4k: Size§direct_map_2m: Size§direct_map_1g: SizeImplementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RAM
impl RefUnwindSafe for RAM
impl Send for RAM
impl Sync for RAM
impl Unpin for RAM
impl UnwindSafe for RAM
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more