Memory Fundamentals
1 / 4
Stack ← Local variables, grows down
↓
Unused
↑
Heap ← malloc lives here, grows up
BSS ← Uninitialized globals
Data ← Initialized globals
Text ← Code
sbrk(0) returns current breaksbrk(n) extends heap by n bytessbrk alone cannot:
We need metadata and block management.