-3

I have been reading about MIPS Memory layout: https://www.cs.uaf.edu/2004/fall/cs301/notes/notes/node12.html As an application programmer, I don't see where the above memory mapping can be relevant to me when i write my application programs. Is it instead relevant to system programmers, Compiler/Assembler writers when they generate the binary addresses in their codes. If so, is there any wisdom behind the choice of the above interlaced addresses?

Thank you

Karlo
  • 1
  • The map as supplied is the memory map *an application sees* - It doesn't tell a system programmer anything. – tofro Sep 30 '17 at 21:32
  • Thank you @tofro. I meant by system programmer in his case: compiler/linker coders. They have to take the above mempry mapping when resolving the different memory addresses – Karlo Oct 01 '17 at 03:35

1 Answers1

0

The map as supplied is the environment your application is "thrown into". It does indeed have some important information:

  • Applications need to be linked to start at address 0x400000
  • Code + Data + Stack cannot exceed 2 gigabytes
  • In case your stack overflows, it will run into your data, not your code (which would be entirely different if the stack grew from 0x400000 downwards, for example)
  • Usable addresses for your program are limited to the range of 0x400000 to 0x7ffffff, so a program cannot occupy more than 2GB

As the map shows the memory layout for an application, thus most probably virtual addresses, it wouldn't be very useful for a systems programmer.

tofro
  • 5,640
  • 14
  • 31