~/talk

Keynote: Mark/Compact GC in MRI

Talkat RedDotRubyConf 2017 · 2017-06-22..06-23· [ruby]
slides:none on file

Implements a mark‑and‑compact GC for MRI using a simple two-finger compaction algorithm and exposes it via GC.compact; runs stop‑the‑world compaction (roughly 100 ms on the demo heap) and is already tested in production at GitHub. Major hurdles: C extensions that call RB_GC_mark, Ruby hashes that use object addresses as keys (making many entries unmovable), and C‑level global caches causing crashes. Measured effects with malloc stack logging and saw only about a 2% memory reduction, so work continues.

AI-written summary · about

  1. 0:00Intro
  2. 1:12@tenderlove
  3. 6:41L-TRAC Mouse
  4. 16:36Compactor needs 2 things
  5. 18:06Memory Layout
  6. 19:41Page Layout
  7. 22:45Tree of Objects
  8. 23:25Mark Phase
  9. 24:10Mark Code
  10. 24:45Free Space
  11. 27:10Compaction Steps
  12. 30:43Update References Pt 2
  13. 31:06Visiting Each Slot 3 Times
  14. 32:353 Problem Cases
  15. 32:48Regular References
  16. 33:42Mark Functions
  17. 35:20Hash Table
  18. 36:10Default Hash Function
  19. 40:46Before Compaction
  20. 48:35Stack Log
  21. 48:47Processing Code
  22. 49:19System Managed vs GC Managed
  23. 49:41OS X (100k slots)
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.