Function sequant::log::process_rss_bytes¶
Defined in File eval.hpp
Function Documentation¶
-
inline std::size_t sequant::log::process_rss_bytes() noexcept¶
- Returns:
the process physical-memory footprint, in bytes. On macOS this is
phys_footprintfromTASK_VM_INFO— the same accounted footprint Activity Monitor reports in its “Memory” column, and what jetsam limits act on. It excludes shared/reclaimable pages (frameworks, the shared cache, file-backed clean pages), so it is much smaller than the raw resident-set size (mach_task_basic_info::resident_size), which double-counts shared text and is what made this column read far larger than Activity Monitor. On Linux we read resident pages from/proc/self/statm. Returns 0 on other platforms and on read failure (no exception, so safe to call from logging paths). Cheap (~µs) — intended to be called once per log record.