Quaisaq Anderson
Quaisaq Anderson

Reputation: 108

Virtual memory usage

I was wondering if someone could tell me what the lower end of virtual memory is typically used for. I've been trying to search around a lot, but couldn't find an answer. I also went through 'Computer Systems: A programmers perspective', but was unable to find an answer.

Models online typically look like this: enter image description here

They all always seem to leave out the bottom part. So I was wondering, is anyone in here able to tell me what that part of the virtual memory space is used for?

EDIT:

I found this: https://gist.github.com/CMCDragonkai/10ab53654b2aa6ce55c11cfc5b2432a4

Which also references these SO answers:

http://stackoverflow.com/questions/7187981/whats-the-memory-before-0x08048000-used-for-in-32-bit-machine

http://stackoverflow.com/questions/12488010/why-the-entry-point-address-in-my-executable-is-0x8048330-0x330-being-offset-of

http://stackoverflow.com/questions/14314021/why-linux-gnu-linker-chose-address-0x400000

Upvotes: 1

Views: 477

Answers (1)

user3344003
user3344003

Reputation: 21712

First of all keep in mind that the diagram you posted is pedagogical in nature, rather than factual.

All virtual memory systems divide the logical address range into a user space and system space. That is a totally correct portrayal in the diagram. The placement of things within those areas can vary widely.

You were specifically asking about the low end. It is common for loaders to set up the virtual address space such that the first page (or first several pages) are not mapped into the address space. The logical addresses starting at zero will not be accessible by default. This is done to catch null point references.

Upvotes: 2

Related Questions