Language Runtimes · Cluster
Garbage Collection
Tracing, reference counting, and collector tradeoffs.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.