Trash Talk: A Garbage Collection Choose-Your-Own-Adventure
summary
A whimsical choose‑your‑own‑adventure frames a concrete tour of Ruby’s garbage collector: how pages and malloc behave, why Ruby keeps pages instead of freeing them, and how the mark-and-sweep algorithm marks roots and sweeps white objects. The transcript walks through a real leak caused by object_space.define_finalizer and a simple fix, and sketches ongoing work on a compacting GC and other performance improvements with concrete implementation notes.
AI-written summary · about
chapters (14)
- 0:00Start
- 5:20What the Garbage Collector Does
- 14:30Malloc More Memory
- 16:48Branch Predictors
- 18:20Memory
- 19:11How Do Computers Actually Work
- 21:34Parts of the Ruby Garbage Collector
- 21:59What Objects Can We Delete
- 27:34Gray Flag
- 30:24Mark-and-Sweep Algorithm
- 31:53How a Ruby Program Could Leak
- 32:26What Is a Memory Leak
- 33:41Memory Leak
- 34:58Object Space Defined Finalizer
related talks
42mTo Know A Garbage Collector
49mRabbit Hole: Garbage Collection and Ruby's Future
21mUnderstanding Garbage Collection in Ruby
34mUnder the Hood of Ruby's Generational Garbage Collector
44mKeynote: Taking Out The Trash
37mDown the rb_newobj() Rabbit Hole: Garbage Collection in Ruby
53mRuby.inspect
42mTweaking Ruby GC Parameters for Fun, Speed, and Profit
