3-3
BASIC EXECUTION ENVIRONMENT
and the procedure stack are all contained in this address space. The linear address space is byte
addressable, with addresses running contiguously from 0 to 2
36
?
1. An address for any byte in
the linear address space is called a linear address.
With the segmented memory model, memory appears to a program as a group of independent
address spaces called segments. When using this model, code, data, and stacks are typically
contained in separate segments. To address a byte in a segment, a program must issue a logical
address, which consists of a segment selector and an offset. (A logical address is often referred
to as a far pointer.) The segment selector identifies the segment to be accessed and the offset
identifies a byte in the address space of the segment. The programs running on an IA processor
can address up to 16,383 segments of different sizes and types, and each segment can be as large
as 2
36
bytes.
Internally, all the segments that are defined for a system are mapped into the processors linear
address space. The processor translates each logical address into a linear address to access a
memory location. This translation is transparent to the application program.
Figure 3-2. Three Memory Management Models
Linear Address
Flat Model
Linear
Address
Space*
Segment Selector
Offset
Segment Selector
Segmented Model
Real-Address Mode Model
Linear Address
Logical
Offset
Space Divided
Into Equal
Sized Segments
Address
Logical
Address
Linear
Address
Space*
Segments
* The linear address space
can be paged when using the
flat or segmented model.