AlgoPlus//structures / segmentation
Read the theory

Segmentation

A logical address ⟨segment, offset⟩ is bounds-checked, then mapped to physical memory.

Access
Physical
Step
1/1
Legend
Legal access
Out of bounds (trap)
Selected segment
AI Tutor Workspace
In a nutshell
Segmentation splits a program into logical, variable-sized segments — code, data, heap, stack — instead of uniform blocks. Each segment is recorded in a segment table by its base (where it starts in memory) and its limit (how long it is). An address names a segment and an offset; the hardware checks the offset against the limit, then adds the base to find the real location.
Ready
Press play to begin the cinematic walkthrough.
Segmentation matches a programmer view of memory: separate variable-sized segments (code, data, heap, stack). A logical address is a segment plus an offset; the segment table bounds-checks the offset and adds the base. Out of bounds means a segmentation fault.
Key terms
Go deeper in the lesson
Read the full theory, intuition & complexity for Segmentation.