OutOfMemory
error before the OS allocates a virtual address at 0xFFFFFFFFF
to your program. (In fact, I wouldn't be surprised to learn that 0xFFFFFFFFF
is actually a reserved error-code location, similar to 0x0
.) But since the addresses that your program knows about have no correlation to true memory addresses, there's a possibility that you'd end up being allocated a memory address that your program thinks of as 0xFFFFFFFFF
, even if the operating system isn't using anywhere near that much memory.0x00000002
, when it goes to load the value out of that memory address, the operating system might recognize that this actually maps to the real memory address 0x00000F23
, and that is the memory address whose value will actually be fetched into the CPU register. Or, it could realize that it has moved the page containing that address onto the disk somewhere, in which case the operating system will find an empty part of memory and load the page's data from the disk into that memory first. (Again, this memory address doesn't have any correlation with the original memory address that the program requested.)libc
, or copy-on-write data pages shared between parent and child after a fork. Duplicating these entries for every process in per-process page tables is less efficient than adding/deleting the process-specific entries to/from a common set of page tables when a process is created/exits.Wikisource has original text related to this article: |