antonau.tech
Home
Posts
About
Search
Home
Posts
About
Search
Escape-Analysis
2026
Tricky parts of Golang. Escape Analysis and Heap Allocations
Apr 24
Two functions. Nearly identical code. One puts your variable on the stack; the other sends it to the heap, adding GC pressure every time it runs. You cannot tell which is which by reading the code — you need to ask the compiler.