What one allocator relief pass observed. There is deliberately no single
“released” number: the allocator’s accounting and the process’s resident
memory measure different things and disagree in practice.
Address-space allocator slack above which opportunistic pressure relief is
worth the zone-lock contention it briefly causes. Slack includes free pages
the allocator already returned to the OS (it cannot tell which free pages
are resident), so it stays above this line after a successful pass and the
pass repeats at ALLOCATOR_SLACK_RELIEF_MIN_INTERVAL. That is intended: a
repeat pass is cheap and returns whatever has been freed since the last one.
Cap on per-root detail entries in serialized snapshots. Process totals
always cover every root; only the per-root breakdown is capped so a
many-root daemon process cannot balloon the status payload past
downstream consumers’ size limits (the daemon metrics cache truncates
around 27 KB, and JSON keys serialize alphabetically, so an oversized
memory.roots map pushes later sections past the cut).
Source label for AllocatorPressureRelief::allocator_accounting_bytes on
macOS: the byte count malloc_zone_pressure_relief returns, i.e. what
libmalloc says it handed back. It is the allocator’s own claim, not a
measurement of resident memory.
How long a periodic reader may reuse an allocator observation whose walk
took walk_ms: floor_ms for a cheap walk, stretched to
ALLOCATOR_WALK_COST_FACTOR times the walk’s duration for an expensive
one, and never past ALLOCATOR_WALK_MAX_REUSE_MS (or floor_ms, if that
is larger).
Return the last process-wide allocator observation without walking allocator
zones. The observation timestamp is separate from the sampler reservation so
a status request never mistakes an in-progress sample for a fresh reading.
On Linux, opportunistically return unused allocator pages without reading allocator
statistics on the module loop. The loop only reads cached atomics. When the
cached observation is stale, one sampler takes an initial snapshot; if it
finds enough slack, the page-return operation reuses it and takes only one
additional after snapshot, limiting the pass to two statistics walks.