Segmentation

Segmentation is when a program’s memory is divided into variable-sized segments based on logical* divisions such as code, data, and stack. 


*They’re called “logical” because each segment groups memory by its functional role and access patterns—executable code, static/dynamic data, and call-stack frames—reflecting the program’s structure rather than fixed physical regions.


Unlike a linear memory model where memory is a single continuous block, segmentation assigns each segment its own base address and length, allowing for fine-grained protection and organization. These schemes were historically used to reflect the logical structure of programs and to provide better isolation between different types of data. However, they add complexity to memory management and pointer arithmetic, which is why today’s computers often favor simpler linear models combined with paging for flexibility and protection.

Segmentation Memory Addressing)

Source