Memory management with MMTk: lessons learned from replacing Ruby's garbage collector
summary
Integrates the Rust-ported MMTk into MRI by building a MMTk binding that replaces Ruby’s allocator calls, starting with a deliberately simple no-GC prototype that initializes MMTk metadata and disables Ruby’s collector. Demo runs Rails successfully, but memory grows monotonically because the prototype never reclaims memory. Identifies real-world gotchas (VM finalizers and fflush behavior), lists next steps: implement MMTk’s mark-sweep API then immix, and provides a porting guide and tests — no fair performance numbers yet.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 1:51Ruby’s GC overview
- 10:04Problems with mark-sweep
- 15:59Why GC innovation is hard
- 17:46What is MMTk
- 21:15Integrating MMTk into Ruby
- 27:36Challenges in no-GC integration
- 28:59Live demo: Ruby on Rails with MMTk
- 31:26Results and future plans
- 33:50Q&A
related talks
30mBuilding the Next-Generation Garbage Collector in Ruby
30mBuilding the Next-Generation Garbage Collector in Ruby
48mMethods of Memory Management in MRI
49mMethods of Memory Management in MRI
34mIt's dangerous to GC alone. Take this!
54mKeynote: Exploring Memory in Ruby - Building a Compacting GC
44mKeynote: Taking Out The Trash
29mWhat causes Ruby memory bloat?
