Dynamic Memory Allocation
Statically allocated objects ...
- are allocated by the compiler (to global/stack areas)
- have a fixed size which is known at compile time
- have a lifetime determined by location (global/stack)
Dynamically allocated objects ...
- are allocated by the executing program (in heap)
- have a size which is known at allocation time
- exist until explicitly removed by program
|