At least part of the memory, which is for stuff created by new/malloc, is organized in the form of Heap. I understand the heap is a structure that the parent node is always larger or smaller than its children nodes. It is either a max or min heap.
For the memory organization, what is the key value for building up the heap? in other words, for what type of information or value we are following the heap construction rule (Max/ Min heap)?
Last, what is the advantage of using heap model to organize the memory? Is there good examples or reasons?