Memory Systems · Cluster
Allocators
Arena, slab, and general-purpose heap design.
- 01 Bump Allocation and the Cost of Arena Reset Why a pointer-increment allocator can serve thousands of requests in a few cycles, what alignment bookkeeping it still needs, and the ownership rule that makes wholesale reset safe.
- 02 Boundary Tags and Coalescing in a Free-List Heap How a heap finds the neighbours of a freed block using headers at both ends, why coalescing is necessary for reuse, and what the deferred variants cost in latency.
- 03 Size-Class Segregation and Fit Policy in the Heap Why bucketing free blocks by size turns an unbounded search into a bounded one, how rounding requests up to a class wastes memory, and how fit policy interacts with fragmentation.
- 04 Slab Caches and Per-CPU Magazines for Fixed-Size Objects How object caches amortise construction and keep hot free objects in per-CPU lists, why the magazine layer exists, and when an empty slab can be returned to the page allocator.
- 05 Thread-Local Caches and the Cost of a Remote Free Why per-thread free lists remove contention from malloc, what a free on the wrong thread must do, and how ownership transfer and rebalancing keep the design from stranding memory.
- 06 How free Recovers a Size From a Bare Pointer The address arithmetic that turns a returned pointer back into its block header, the alignment assumptions that make it work, and the cases where the original base cannot be reconstructed.
- 07 Fragmentation Without Leaks: Diagnosing a Growing Heap Why a process whose live set is flat can still grow, how internal and external fragmentation differ in cause and cure, and which counters distinguish the two.
- 08 Heap Growth and Release: brk, mmap, and Trim How a process obtains heap memory from the kernel, why a large allocation bypasses the main heap entirely, and what returning pages actually costs at the page-table level.
- 09 Alignment, Padding, and Over-Aligned Allocation What the alignment guarantee on a returned pointer actually promises, how allocators satisfy requests stronger than the ABI default, and why page-granular requests behave differently.
- 10 Hardened Allocators and Metadata Integrity How allocator metadata becomes an attack surface, what canaries, quarantines, and out-of-band tables actually detect, and the performance each check costs.