Program Segments
This plot illustrates a program segments.
Stack
on each function call, activation record, also know as stack pointer, containing local variables, return address, function parameters will be pushed onto the stack; once the control is returned from the function, the activation record will be popped from the stack.
heap
heap will grow as memory is dynamically allocated.
Uninitialized Data (BSS Segment)
bss segment, containing uninitialized global variables and static variables.
Initialized Data (Data Segment)
data segment, containing initialized global variables and static variables.
Text
stores the executable code for a program.