~/talk

Go: escape analysis

Talkat Devoxx Ukraine 2021 · 2021-11-19..11-20· [go]
links:none on file
slides:none on file

Explains how Go’s escape analysis decides stack vs heap placement, using go build with -gcflags "-m=1" and "-m=2" to show why returning a pointer, taking an address, interface conversions, or map/slice element pointers force heap allocation; shows stack starts at 2 KB and can grow up to 1 GB on 64-bit, and that large implicit variables (~65 KB) or unknown runtime sizes trigger heap moves. Notes GC is concurrent and can steal 25–50% CPU and that GOGC controls when collection runs.

AI-written summary · about

  1. 0:00Introduction and agenda
  2. 1:53Memory layout in Go
  3. 5:55GC and scheduler basics
  4. 10:15Escape analysis explained
  5. 13:42Real-world code examples
  6. 28:04Summary and conclusion
~/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.