Session

After malloc(): Go Memory Management Through a Beginner's Eye

Do you know what actually happens in memory when your Go program runs? Where do your variables live and who decides when they disappear?

Background
When I started writing Go, I thought memory management was something the language just handled for me. Garbage collection was a magic black box. I wrote make(), I allocated structs, I never thought twice.
Then I started building a high-throughput service and things got interesting. Latency spikes I couldn't explain. A heap that kept growing. GC logs that looked like a foreign language. I realised I had been writing Go without understanding one of its most fundamental systems memory.
This talk is a beginner-friendly dive into how Go actually manages memory under the hood. We'll explore how Go decides what lives on the stack versus the heap, how its allocator organises memory using a three-level hierarchy inspired by Google's own TCMalloc, and how the garbage collector finds and frees memory without stopping your entire program.
As someone who has spent the past two years exploring Go's runtime from a beginner's perspective first data race detection, then the goroutine scheduler this talk is the natural third chapter: what happens to the memory those goroutines use.

This session is especially helpful for those who have heard the words "GC pause" or "heap allocation" and nodded along without really knowing what they mean and are ready to finally look inside.

Expected Effect on Audience
Attendees, especially beginners, will leave with:

A clear mental model of stack vs heap and how Go's escape analysis decides which is which
An understanding of Go's three-level memory allocator: mcache, mcentral, and mheap
A visual understanding of the tricolor mark-and-sweep garbage collector and what "stop the world" actually means today
The ability to read GODEBUG=gctrace=1 output and understand what their program's GC is doing
Awareness of the upcoming Green Tea GC in Go 1.25 and why it matters
Curiosity to go deeper into Go's runtime with concrete starting points

This talk completes the bridge from "I write Go" to "I understand what Go does with my memory."

Vaibhav Gupta

Backend Engineer | Golang Developer

Tokyo, Japan

Actions

Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top