Memory Management — Middle¶
Reference counting reclaims promptly but needs cycle handling. Tracing collectors mark from roots and reclaim the rest; generational collectors optimize for short-lived objects. Allocators use arenas, size classes, and caches. Escape analysis may remove heap allocations.
Measure allocation rate, live set, pause distribution, and RSS separately.
Test yourself¶
- Why do cycles defeat plain refcounts?
- What is the generational hypothesis?
- Why can RSS exceed managed heap?
Continue to senior.md.