Heap vs. Stack. visual depiction of run-time storage. heap. freelist -- list of free space. on allocation -- memory manager finds space and marks it as used changing freelist.
Thanks for this awesome brief about heap and stack memory. [Based on the above explanations, we can easily conclude following differences between Heap and Stack memory. Heap memory is used by all the parts of the application whereas stack memory is used only by one thread of execution.] Question: Block for main thread always exists.