Understanding the Go runtime
summary
Shows the Go runtime shipped into every binary (version 1.22 runtime), with the ELF entry at rt0 entry before main and compiler-inserted calls into runtime for maps, slices and stack growth. Practical tools used: readelf and gdb to inspect entry points, and source links with file/line references. Surprising numbers: empty Go binary ~1.2MB vs C ~16KB and slice growth: 124 ints → 8,192 bytes but 125 ints → 9,472 bytes because of mspan sizes up to 32KB. GC pacing follows GOGC=100.
AI-written summary · about
chapters (23)
- 0:00Go runtime introduction
- 0:41Talk purpose
- 3:30Go vs C execution
- 5:18Compiler and runtime
- 10:16Runtime in binaries
- 11:46Go runtime bootstrap
- 13:33Go scheduler basics
- 15:39Stop the world init
- 16:41Memory allocator
- 21:45CPU flags and RNG
- 23:10Main thread init
- 24:35Secure flag setup
- 26:21Debugging config
- 27:05Garbage collector
- 30:23Virtual CPUs start
- 31:06Runtime main monitor
- 34:57GC auxiliary processes
- 35:19What happens while the runtime runs
- 37:25Compiler runtime features
- 38:08Runtime init recap
- 39:32Key takeaways
- 41:19Explore Go source
- 42:44Q&A








