~/talk

An insight into Go Garbage Collection

Talkat Golang Piter 2019 · on Friday, 2019-11-01· [go, compilers-and-language-design]
links:none on file
slides:none on file

Covers Go’s actual GC mechanics: escape analysis decides heap vs stack allocation, stacks grow and split, and allocators use per-P caches with 67 size classes; marking uses a tri‑color mark‑and‑sweep with a buffered write barrier (hybrid fast path plus overflow), about 25% of CPUs do background marking, and pacing follows GOGC default 100 to aim to double the heap before a cycle. Shows concrete tuning: pack structs, cut pointer counts, use sync.Pool to reuse objects, and warns raising GOGC reduces collection frequency but can cause big heap spikes.

AI-written summary · about

  1. 0:00Introduction
  2. 1:24Stack vs heap allocation
  3. 7:24Dynamic memory basics
  4. 10:17Garbage collection fundamentals
  5. 14:22Parallel garbage collection
  6. 20:31Write barriers in GC
  7. 25:20Marking phase details
  8. 30:52Memory pressure and tuning
  9. 40:34Tuning Go garbage collector
  10. 43:34Q&A
~/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.