~/talk

Golang memory footprint

Talkat code.talks 2019 · 2019-10-24..10-25· [go]
links:none on file
slides:none on file

Shows concrete numbers and techniques: Go slice headers are 24-byte slice header overhead separate from payload, benchmarks report real allocation while unsafe.Sizeof does not, slice growth shrinks from doubling to ~125% for large capacities, maps use buckets of 8 and trigger resize at a load factor 6.5, buffered channels round allocations to heap-size classes (capacity 100 → 896 bytes, 101 → 1024), GOGC default 100 and ballast reduces GC work, avoid interface-induced heap escapes, and use pprof to find and fix hot allocations.

AI-written summary · about

  1. 0:00Introduction to Memory
  2. 1:56Measuring Memory Usage
  3. 4:23Data Structures Overhead
  4. 5:28Deep Dive into Types
  5. 10:52Resizing Mechanics
  6. 17:05Structure Alignment
  7. 21:11Heap and Stack Allocation
  8. 25:16Garbage Collection Optimization
  9. 33:31Profiling 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.