Keynote: Taking Out The Trash
summary
Explains how MRI actually reclaims and allocates memory: a mark-and-sweep collector that is generational and incremental using tricolor marking, plus right barriers and remembered sets to avoid freeing live objects. Details: Ruby page ≈16KB, object slot ≈40B, tag pointers use low bits so small ints and symbols avoid allocation; fixednum limits explained. Shows practical tools GC.stat, GC::Profiler and ObjectSpace.dump_all and proposes grouping likely-old objects into dedicated pages to reduce fragmentation and fork copy‑on‑write.
AI-written summary · about
chapters (14)
- 0:00Intro
- 0:46Who am I
- 2:15Cats
- 8:50Types of Garbage Collector
- 11:19Markandsweep
- 13:30Generational Garbage Collector
- 15:26Write Barrier
- 17:57Tricolor Marking
- 26:29Allocation Hacks
- 28:31Representation Hacks
- 31:52Allocation Problems
- 33:30Grouping Objects
- 35:53Grouping Old Objects
- 40:44Questions
related talks
49mMethods of Memory Management in MRI
48mMethods of Memory Management in MRI
01h 01mKeynote: Mark/Compact GC in MRI
54mKeynote: Exploring Memory in Ruby - Building a Compacting GC
01h 01mKeynote: Mark/Compact GC in MRI
46mBuilding a Compacting GC for MRI
48mDefragging Ruby
46mHalve Your Memory Usage With These 12 Weird Tricks
