In-Depth Understanding of Heap Implementation¶
If you think about it carefully, any heap implementation needs to consider the following issues from two perspectives:
- Macro perspective
- Creating the heap
- Heap initialization
- Deleting the heap
- Micro perspective
- Allocating memory blocks
- Freeing memory blocks
Of course, these are relatively high-level ideas, and the underlying implementations of different heaps will vary.