Heap Definition
Learn about the heap memory area and its usage.
We'll cover the following...
Introduction
Recall that the result of the code compilation process is an executable file. It contains various sections, such as the following:
- Static sections
- They physically exist inside the executable file. At runtime, they are loaded into memory.
- Examples:
.text
,.data
,.rodata
, and.bss
- Dynamic sections
- They don’t physically exist inside the executable file. The executable file only stores a reference to memory areas.
- The operating system allocates these memory areas and alters the references inside the executable file to point to the allocated memory.
- Examples:
.stack
and.heap