A visual guide to Go Memory Allocator from scratch (Golang)

Ankur Anand has written an in-depth blog post to explain how memory management work in Go.

… the general idea of the Go memory management is to allocate memory using different memory structures using different cache level memory for objects of different sizes. Splitting a single block of consecutive addresses received from the operating system, into a multi-level cache improve the efficiency of memory allocation by reducing the locks and then allocating memory allocations according to the specified size reduces memory fragmentation and facilitates faster GC after the memory is released.