Os.heap_relief(): the allocator's freed-but-cached memory handed back, once after a load
Beside Os.heap_bytes: malloc_zone_pressure_relief(NULL, 0) on macOS (weak, so a libc without it reads 0) and HeapCompact(GetProcessHeap(), 0) on Windows - kernel32 only, so the Windows build imports nothing new; the bytes it says it released. Once after a load, never per frame. Measured, for the record: on macOS it does NOT reach the large-block cache. A C program that frees six 15 MB blocks still holds 90 MB of MALLOC_LARGE (empty) after relief on every zone (it returns 0); only MallocLargeCache=0 in the environment AT PROCESS START turns the cache off (read at malloc's init - set later, it does nothing). Maroon Lake's watcher sets it for the processes it spawns. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
5297996640
commit
e958d00373
5 changed files with 34759 additions and 34607 deletions
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue