total_physical_memory_bytes

Function total_physical_memory_bytes 

Source
pub fn total_physical_memory_bytes() -> Option<u64>
Expand description

Total physical RAM in bytes from /proc/meminfo MemTotal, if readable.

None on non-Linux and on any parse failure (never panics). This is the fallback ceiling when no cgroup limit is set, so a bare Linux VM still gets a bounded memory gate instead of an unbounded one. NOTE: MemTotal is HOST-wide - in a container with no cgroup limit this over-states the container-usable RAM (see OPERATIONS.md).