As I know in win32 every program receives say 4GB of virtual memory. Memory manager is responsible for offloading chunks of memory from physical memory to disk.
Does it imply that malloc or any other memory allocation API will throw OUT_OF_MEMORY exception only when virtual limit is hit? I mean is it possible for malloc to fail even if program is far from its virtual size limit e.g. none of physical memory can be offloaded to disk. Assume disk have unlimited capacity and no specific limitation is set.