-
Program segments (e.g., the code segment) must be loaded into contiguous memory.
-
Consecutive memory locations are required because the compiler generates code for "sequential statements":
- sequential statements
- "if statments"
- "loops" that generate jump or branch instructions to addresses
all expect instructions to be stored in consecutive memory locations.
-
In particular, when an instruction is fetched from the memory address in the PC register (%eip on Intel IA32), the PC is then incremented. This assumes that the next instruction is in the next memory address.