Language Runtimes · Cluster

Garbage Collection

Tracing, reference counting, and collector tradeoffs.

  1. 01 Reachability from Roots and the Transitive Closure How a tracing collector enumerates its root set, walks the object graph to a fixed point, and why unreachability rather than uselessness is the property it can actually compute. foundational · Feb 5, 2024
  2. 02 Reference Counting and Its Structural Blindness to Cycles Why a count per object frees memory deterministically and still leaks a two-node cycle, what the counting discipline costs per assignment, and how trial deletion recovers. foundational · Sep 11, 2026
  3. 03 Mark-Sweep and the Fragmentation It Leaves Behind How a sweep pass rebuilds allocatable space, why segregated free lists and size classes delay the fragmentation problem rather than solve it, and what coalescing costs. foundational · Jun 26, 2026
  4. 04 Copying Collection, Cheney Scanning, and the Bump Pointer Why a semispace collector trades half the heap for allocation in a few instructions, how Cheney's breadth-first scan avoids a recursion stack, and what forwarding costs. intermediate · Jun 3, 2024
  5. 05 Generational Collection and the Write Barrier That Enables It How the weak generational hypothesis justifies splitting the heap by age, why a young-only collection must be told about old-to-young pointers, and what each barrier flavour costs. intermediate · Apr 9, 2024
  6. 06 Mark-Compact: Sliding Objects Without a Second Semispace How a compacting collector relocates live objects into one end of the same heap, the two passes needed to compute and then apply new addresses, and why the ordering of objects matters. intermediate · Mar 14, 2023
  7. 07 Tri-Colour Marking and the Barriers That Keep It Honest Why a concurrent marker must prevent a black object from pointing at a white one, how insertion and deletion barriers each enforce that, and what the invariant costs per store. intermediate · Apr 14, 2026
  8. 08 Conservative Stack Scanning Without Type Maps How a collector can treat any word that falls inside the heap as a pointer, why that forces a non-moving heap, and what the ambiguity costs in retention and false roots. advanced · Jan 9, 2024
  9. 09 Weak References, Finalization, and Ephemerons How a collector clears references that must not keep objects alive, why finalization needs its own reachability class, and the fixed-point iteration that ephemeron tables require. advanced · Jan 30, 2025
  10. 10 Heap Growth and the Pacing of Collection Cycles How a runtime decides when to collect and how much heap to add, why the live-set measurement after each cycle determines the next one, and how pacing trades memory against pause. advanced · May 20, 2024