Skip to main content

Module memory

Module memory 

Source
Expand description

Physical memory introspection.

Functions§

physical_memory_bytes
Returns the physical memory available to this process in bytes: the host’s RAM, clamped by the cgroup memory limit when one is set. Both cgroup v1 and v2 are honored, resolved through /proc/self/mountinfo and /proc/self/cgroup rather than an assumed mount path, so containers (including host-namespace cgroup mounts) do not derive budgets from host RAM. None if detection fails.