~/talk

Go Stack: Should It Be Moving Like That?

Talkat GopherCon AU 2023 · 2023-11-08..11-10· [go, concurrency]
slides:none on file

Built a production Go debugger with runtime hacks that forces deep runtime reading, revealing concrete mechanics: goroutine stacks start at 2 KB initial stack versus OS threads' 1–10 MB, the compiler inserts prologue/epilogue checks that call morestack doubles stack to grow stacks, and the runtime uses per-g metadata and stack guard offsets to relocate pointers during copy. Escape analysis moves small locals to the heap, increasing GC cost; the GC later calls shrinkstack when usage falls below one quarter.

AI-written summary · about

  1. 0:00Introduction to Go stack
  2. 3:24Stack growth in Go
  3. 11:58How Morestack works
  4. 16:39Pointers and stack vs heap
  5. 19:30Why understanding runtime matters
  6. 23:04Performance and trade-offs in Go
  7. 24:32Go runtime insights 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.