More About the Operation of the Go Garbage Collector

Let’s learn more about the operation of the Go garbage collector and the mark-and-sweep algorithm.

Understanding the Go garbage collector and its focus on low latency

This lesson talks more about the Go GC and presents additional information about its activities. The main concern of the Go GC is low latency, which basically means short pauses in its operation in order to have a real-time operation.

On the other hand, what a program does is create new objects and manipulate existing ones with pointers all the time. This process can end up creating objects that can no longer be accessed because there are no pointers pointing to these objects. These objects are then garbage and wait for the GC to clean them up and free their memory space. After that, the memory space that has been freed is ready to be used again.

Get hands-on with 1200+ tech skills courses.