Balanced GC: A Copying Garbage Collector for Golang
summary
Adds per-goroutine allocation buffers called gaps and uses bump allocation for no-scan objects ≤128 bytes, marking object starts with a bitmap and merging small allocations into larger gap objects. Live objects are copied into survivor gaps via a pointer queue during a mark-termination evacuation, with pinning to avoid changing map key hashes. Deployed at bance as an opt-in GC mode and shows ~4% CPU improvement on average, up to 10% when >50% of objects land in gaps.
AI-written summary · about
chapters (6)
- 0:00Balanced GC intro
- 2:13Motivation for optimization
- 9:56Bump allocation details
- 16:38Evacuation triggering
- 21:58GC compatibility pitfalls
- 26:39Production results








