The Garbage Collector (opens in new tab)
In the previous article we explored the Go scheduler — how goroutines get multiplexed onto OS threads, the GMP model, and all the tricks the runtime uses to keep your cores busy. But there’s a fundamental problem we haven’t addressed yet: all those goroutines allocate memory, and somebody has to clean it up. That’s the garbage collector’s job, and that’s what we’re exploring today. In this article we’ll be looking at the garbage collector as it works in Go 1.26, which introduced the GreenTea...
Read the original article