2 ms·
The classical reason why stacks grow downward is because heaps grow upward. This arrangement maximizes the usefulness of the virtual address space in a single-t
by nayuki 7y ago
The classical reason why stacks grow downward is because heaps grow upward. This arrangement maximizes the usefulness of the virtual address space in a single-threaded process.
- Taniwha 7y agowell stacks typically grew downwards even before there were heaps (but not always - Burroughs large systems for example) Heaps of course can grow downwards With modern 64-bit address spaces actual running out of space is not an issue (especially since we're dynamically moving around code, heaps and stacks for security reasons anyway)