Memory Allocation

Briefly introduce the strategies that how go runtime allocates memory.

Answer

  1. For small objects(<=32KB), go runtime starts with cache firstly, then central, and finally heap.
  2. For big objects(>32KB), directly from heap.