Virtual memory
If a process demands more memory than exists in the actual physical RAM, the OS will never crash . The OS job is to either dispatch some "old" memory that was unused for some time to the HDD and load it back to the physical RAM when required, and/or commit the RAM (committing is NOT allocating), thus giving the process/program a pointer to the "allocated" ram, and when the program references each page (pages are usually small chunks of memory , 4KB in the Intel x86 architecture), the CPU will generate a page fault , which the OS will handle, and actually allocate physical RAM for the specific page. Thus , you can ask for 1GB of RAM , and the OS will provide you with a pointer, the actual memory will *NOT* be allocated until you really reference each page .. Notice that modern operating systems are designed NOT to crash at ANY cost. Also, about the 4GB address space , only Windows 9x (a very naive OS) manages memory as someone above suggested .. (ie , upper 2GB is committed for OS services and memory, while lower 2GB is committed for the process memory) , this memory management is not very protected, since it allows (like in windows 3.11 for that matter) one process in user mode to alter memory used by other processes, and worse, by the OS itself , with no actual protection .