Scuze me. Head up my butt. Ignore what used to be here. I was thinking of a RAM disk which is totally wrong.
OK. I'm forgetting my basics. Rather than rewrite it, let's let Microsoft explain (with some emphasis added):
In most modern operating systems, including Windows, application programs and many system processes always reference memory using virtual memory addresses which are automatically translated to real (RAM) addresses by the hardware. Only core parts of the operating system kernel bypass this address translation and use real memory addresses directly. The virtual memory management component of the operating system maintains the tables used by the hardware to provide the mapping of virtual addresses into real addresses. A small amount of RAM is used by those parts of the operating system that can not be paged out (for example, the virtual memory manager) and is thus not available for assignment to virtual memory.
The key point here is that Virtual Memory is always in use, even when the memory required by all running processes does not exceed the amount of RAM installed on the system.
Why it's a good thing and you want it:
There are several advantages to Virtual Memory implementations with per process virtual address spaces, some of which are:
- Application writing is simplified. The application developer doesnâ€™t have to worry about how much RAM is available or what addresses are available to it. The application writer (and compiler) knows that every application will get its own set of virtual addresses (called an Address Space) that it can use any way it wishes (except for the portion of the address space reserved by the operating system) without regard to what other applications are doing.
- The system is more robust and secure because applications can not overwrite or read memory belonging to another application â€“ there is no addressability to another applicationâ€™s address space.
- Management of RAM allocation to processes is centralized in a core part of the OS. The algorithms used by the Virtual Memory management part of the OS have a long history, are well understood, quite sophisticated and highly optimized. The knowledge and skills required to do this well are very specialized and not usually present in application developers whose focus is on the application/business requirements.
So what is it that's using it - and why is it 2GB in size:
A process is essentially, the combination of:
- Some executable code
- A virtual address space
- One or more threads of execution.
The only way to increase the size of the virtual address space for a process beyond 4 GB is to use 64 bit hardware with a 64 bit version of the operating system and application built for the 64 bit instruction set.The nub of it is, that no matter how much physical RAM is in the computer, the amount of memory available in the processâ€™ private part of the virtual address space in 32 bit Windows implementations is limited to:
- without the /3GB switch - this is the normal, default maximum private virtual address space
So it's not something you set up like you would the pagefile size. It's controlled by Windows itself.
Sorry for the earlier confusion on my part.