Deep understanding of heap implementation¶
Think about it carefully, any heap implementation needs to consider the corresponding problem from the following two perspectives.
- Macro perspective
- Create a heap
- heap initialization
- Delete heap
- Micro angle
- Apply for a memory block
- Free memory block
Of course, these are relatively high-level ideas, and the underlying implementation of different heaps will be different.