A program is segmented into several regions of memory.
TODO: Insert picture of process here with Stack/Heap/Data/Text sections.
Stack Memory
Automatically allocated data structure
Typically used for short-lived data.
Any time we create a variable, it is placed on the stack.
Allocating
Heap Memory
Heap/Free Store Data Structure
Used for longer lived and larger memory allocations.
More expensive to allocate, as we have to request memory from operating system (requires a context switch to the system)
Memory has to be searched for (either from the 'heap/free store' data structure, or otherwise allocated in the process)
Please do not redistribute or host any materials without e-mailing me first. I generally am happy to share the latest .pdf or slide presentation with those who ask. Thank you for your time!