Stack Resident Memory Values
C++
- Both the stack and the heap are internal data structures managed by a run-time system.
- Values on a stack are strongly tied to procedure entry and exit.
- When a procedure begins execution, a new section of the stack is created.
Java
- only primitive values are truly stack resident.
- objects and arrays are always allocated on the heap.