Because it is a virtual address, not a physical one.
Each process gets its own address space (for example, a 32-bit system can allow each process to have its own address space with a full 4G range).
This is a memory management unit that will map virtual addresses to physical ones (and handle things like page errors if paged pages need to be redeemed from secondary storage).
The following diagram may help, each section represents a 4K memory block:
Process A Physical Memory Process B +-------+ +-------------+ +-------+ 0K | |----> 0K | (shared) | <----| | 0K +-------+ +-------------+ +-------+ 4K | |--+ 4K | | <----| | 4K +-------+ | +-------------+ +-------+ 8K | | +-> 8K | | | | 8K +-------+ +-------------+ +-------+ | : : : : : : : | | +-------------+ | | 128K | | <--------+ | +-------------+ +--------> 132K | | +-------------+
You can see in this diagram a disconnection between virtual memory addresses and physical memory addresses (as well as the ability for processes to share memory blocks). The addresses on the left and right are the virtual addresses that the processes see.
The addresses in the central unit are the actual physical addresses where the data is "valid", and the MMU processes the mapping.
For a deeper explanation of fork (and exec ), you can also see this answer .
paxdiablo
source share