C Memory Explorer

Memory Layout

Program Memory Layout

This section provides a visual model of how a C program's memory is organized into segments. Each segment has a specific purpose, from storing executable code to managing function calls. Click on any segment in the diagram to learn more about its role and characteristics. This layout is a simplified model, but it illustrates the key concepts of memory management in C.

High Memory
Stack
⬇
↓
...
↑
Heap
⬆
BSS
Data
Text
Low Memory

Select a segment

Click on a colored block to the left to see details about that memory segment.