Collecting Cyclic Garbage across Foreign Function Interfaces: Who Takes the Last Piece(…)
summary
Refgraph GC coordinates two independent tracing collectors by copying a compressed reference graph from Ruby into an unmodified JavaScript runtime so the JS collector can reclaim cross-language cycles; only the Ruby VM is modified. A send barrier handles races when mutator threads create edges after copying. Implementation reclaims previously leaked cycles, first attempt missed some before the barrier fix, and measured overhead is small with copied graph size under 2% of heap in experiments.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 0:54Motivation for cyclic GC
- 3:07Cyclic garbage in FFI Ruby-JS
- 5:41RefGraph GC proposal
- 6:51RefGraph GC example
- 8:35RefGraph GC send barrier
- 12:08Experimental results
- 12:51Related work comparison
- 13:12Summary
- 13:55Q&A
related talks
34mUnder the Hood of Ruby's Generational Garbage Collector
42mTo Know A Garbage Collector
21mUnderstanding Garbage Collection in Ruby
41mIncremental GC for Ruby interpreter
49mRabbit Hole: Garbage Collection and Ruby's Future
53mRuby.inspect
21mMemory: Don't Forget to Take Out the Garbage
28mA Write Barrier Validating GC for Ruby
