# Memory segmentation

Last edited: 2025-03-22

Memory segmentation

Segmentation is a memory management technique that divides memory into logically distinct memory segments , such as code, data, and stack segments, each with a variable size. Instead of using fixed-size blocks like paging , segmentation allows programs to allocate memory dynamically based on their needs. The operating system manages memory through a descriptor table , which stores the base address and limit of each segment. Segmentation can reduce internal fragmentation but may lead to external fragmentation without additional management techniques.