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/mountinfoand/proc/self/cgrouprather than an assumed mount path, so containers (including host-namespace cgroup mounts) do not derive budgets from host RAM.Noneif detection fails.