The concept of segmentation is based on the common practice by programmers of structuring
their programs in modules—logical groupings of code. With segmented memory
allocation, each job is divided into several segments of different sizes, one for each module
that contains pieces that perform related functions. Segmented memory allocation
was designed to reduce page faults that resulted from having a segment’s loop split over
two or more pages. A subroutine is an example of one such logical group. This is fundamentally
different from a paging scheme, which divides the job into several pages all of
the same size, each of which often contains pieces from more than one program module.