~/talk

Memory Management in Go: The good, the bad and the ugly

Talkat GopherCon UK 2023 · 2023-08-16..08-18· [go]
slides:none on file

Explains that Go uses a concurrent mark‑and‑sweep GC that does stop‑the‑world pauses at mark phases, that goroutine stacks start at 2–4KB and can grow, and that common leaks come from never‑ending goroutines or unclosed DB connections (use defer). Shows concrete tooling: run pprof via net/http, read heap profiles and flame graphs, find functions repeatedly allocating, and preallocate slices to avoid reallocations. Demonstrates fixing a pointer‑swap bug with GitHub Copilot and validates it runs.

AI-written summary · about

  1. 0:00Introduction to memory
  2. 1:25Key concepts and foundations
  3. 3:38Understanding memory structure
  4. 6:34Manual vs automatic management
  5. 9:07The stack and heap in Go
  6. 12:31Memory visualization and cleanup
  7. 14:12Pointers and references
  8. 18:12Managing memory leaks
  9. 19:33Optimization and tradeoffs
  10. 21:57Profiling tools for Go
  11. 25:17Using AI for debugging
  12. 28:58Conclusion and takeaways
~/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.