As a general rule of thumb device drivers get loaded before any heavy user space application; and those drivers (e.g. for PnP devices) that do get loaded on demand cannot make assumptions about addresses being available or not by their definition anyway. Furthermore allocation of memory (malloc) returns a pointer to the block allocated by the OS, or NULL on failure. At that point (malloc returning NULL) for most applications there is pretty much nothing that they can do but roll over and die.
If you allocate and use an additional 2.5GB of memory in a system with 2GB physical memory where before the load was 1.5GB of memory and you have an additional 4GB swap file... the sum is 1.5 +2.5 = 4GB in all address space used. Of course you are going to see a lot of trashing and the system will more or less freeze up. So things might continue running or you might get an OOM error which kills the process that attempts to fill an additional 2.5GB of RAM.
But consider if the load had been only 0.5GB: the math works out as 3GB of load and things should continue running normally albeit slowly because of trashing. Things get even more complex and opaque when the system uses “overcommitting” (don't know if NT does that).
Bookmarks