Has anybody got an idea why the area of main memory where objects are allocated is referred to as the heap. I can understand the rationale for that of the stack LIFO but would like to know what the rationale is for the 'heap' name.
Why is the main memory for object allocation called the ‘heap’
heapmemoryprogramming-languagesstack
Related Topic
- Stack and heap – dynamic allocation question
- How OS Limits Stack and Heap Sizes
- Memory Leak Terminology – Why Is It Called a Memory Leak?
- How is stack and heap are assigned to each processes
- Java – Does Java Copy Method Parameters to the Stack Frame?
- C++ Memory Management – Understanding Memory Segmentation: Stack, Heap, etc.
Best Answer
From the information found at StackOverflow - What is the origin of the term “heap” for the free store? and Why are two different concepts both called “heap”?
This information at least dates back to Knuth in 1975 referencing other (unnamed) authors:
There is also mention of Wijngaarden discussion on Algol in the early 1970s referring to the available memory pool as a heap (
heap
is a reserved word in Algol which is defined in places as "allocate variable some free space from the global heap." - Algol68 dates from 1968).Implementing the ALGOL 68 heap from 1970 may be of use in tracking down some aspects of word origin, though much if it is behind a paywall.