In the modern programming language, the memory usually separated into stack and heap. The heap size changes during runtime. I want to introduce the mechanism and strategy Go used to allocate new memory and deallocate the memory. Start from tcallocator component, mcache, mcentral, and mheap and how they interact with each other when the allocation happened. The garbage collector is responsible for deallocation. How to reuse the memory in the heap? When should we release the memory to OS?
About Gaston QIU
UmboCV backend engineer