next up previous
Next: Calling Convention Up: SPIM S20: A MIPS Previous: Floating Point

Memory Usage

   figure836
Figure 3: Layout of memory.

The organization of memory in MIPS systems is conventional. A program's address space is composed of three parts (see Figure 3).

At the bottom of the user address space (0x400000) is the text segment, which holds the instructions for a program.

Above the text segment is the data segment (starting at 0x10010000), which is divided into two parts. The static data portion contains objects whose size and address are known to the compiler and linker. Immediately above these objects is dynamic data. As a program allocates space dynamically (i.e., by malloc), the sbrk system call moves the top of the data segment up.

At the top of the address space (0x7fffffff) is the program stack, which grows down, towards the data segment.



CS 301 Class Account
Sat Sep 27 14:12:00 ADT 1997