Jump to content

C++ Language/Std/CRuntime/HeapMemory

From Wikibooks, open books for an open world

In C++, a program's data is stored in one of two regions of system memory. Local variables and function parameters are obtained from the "memory stack", where that usage will be "popped off the stack" when the function ends. Other data can be dynamically allocated from the system's "memory heap". Heap memory will persist until it is manually deallocated.

  1. Allocation
  2. Memory Manipulation
  3. Leaks