Memory Systems · Cluster
Profiling Memory
Leak detection, fragmentation, and footprint analysis.
- 01 Reading a Process Footprint: RSS, PSS, and Shared Pages Why resident set size double-counts shared pages, how proportional set size divides them between users, and which memory a process consumes that no per-process counter attributes to it.
- 02 Interposing on malloc: How Allocation Tracing Hooks a Heap How a tracing layer replaces malloc and free without editing the program, why the replacement must not call the functions it replaces, and which allocations escape interposition entirely.
- 03 Attributing Allocations to Call Sites by Unwinding the Stack How a tracing allocator recovers the calling stack for each allocation, why frame-pointer chains fail in optimised code, and what a table-driven unwind costs per event.
- 04 Reachability, Retention, and What Counts as a Leak Why unreachable memory and unfreed memory are different problems, how a tracing collector decides an object is dead, and where conservative roots keep garbage alive.
- 05 Allocator Metadata and the Real Cost of a Small Object What a heap spends on headers, free-list links, alignment padding, and page maps, and how to compute the ratio between bytes requested and bytes the process actually pays for.
- 06 Measuring Fragmentation: Free Space That Cannot Be Used How internal and external fragmentation differ, why a heap can be mostly free and still fail a large request, and which ratios turn free space into a number that predicts allocation failure.
- 07 Sampling Allocation Profilers and the Statistics of Estimates How a profiler that records one allocation in a few thousand still reports accurate totals, why the sampling must be size-weighted, and how the confidence interval is computed.
- 08 Splitting Footprint by Mapping Type: Anonymous, File-Backed, and Special How a process address space divides into anonymous, file-backed, and special mappings, what each contributes to footprint, and how to read the permission and label fields that identify them.
- 09 Footprint Under a Container Limit: Reclaim, Working Set, and the OOM Decision How a memory cgroup accounts page cache and anonymous memory, why a process at its limit keeps running while a slightly larger one is killed, and how to read the counters that separate reclaimable from unreclaimable.
- 10 Detecting Slow Growth in a Long-Running Process How to separate a genuine slow leak from allocator sawtooth and from legitimate growth, using slope estimation, idle baselines, and live-set accounting rather than a single threshold.