Windows already does this with page files.
The software asks the operating system how much memory the computer has and the operating system replies with the amount of ram installed in the computer, plus a quantity that depends on how much disk space is available and how you configured the paging system.
On Windows 7, click on Start, then right click on Computer, and select Properties. Then click on Advanced Settings. In the Advanced tab, click on the Settings button in the "performance" section, then go again in the "Advanced" tab and click on "Change" button.
You can uncheck that "Automatically manage ..." option and tell Windows exactly how much disk space you're willing to let Windows use, on each drive letter. It can be either a minimum and maximum size and then Windows will automatically adjust the file size of the page file on that drive depending on how much it uses, or you can set the same number in both boxes like in the picture above and then the file will always stay the same and be fixed.
In Windows 8 and later, it should be pretty much the same, just maybe the way you reach them is a bit different .. ex on my windows 2008 web edition dedicated server, it can be reached through Control Panel > System and Security > System > Advanced System Settings and then it's like in the pictures above.
So basically let's say you have a computer with 4 GB of RAM and you configured Windows to use up to 10 GB of disk space. You have Firefox or Google Chrome using 1 GB of memory out of 4 GB. When you start another application, Windows will tell that application that there's 13 GB of memory free. As the new application starts to use memory, Windows will try as much as possible to make room in the real memory because that's much faster than hard drives, so it looks at applications in the background or minimized (like Firefox) and starts moving the information they store in ram to the hard disk... the new application will never know what happens in the background.
-----
If you want the other way around, to create a small hard drive using the memory installed in the computer, then you can install software that creates virtual hard drives, I personally use ImDisk :
http://www.ltr-data.se/opencode.html/#ImDisk--
But keep in mind, most diagnostic applications are smart enough to detect the REAL amount of memory installed in the computer so you won't see that number changing. However, application will be able to use a lot of memory.
Also, 32 bit applications by design can only use up to about 2-3 GB of memory, no matter how much RAM you have installed, or how much disk space you configure there for page files. 64 bit applications can use as much memory as you throw at them (terabytes of ram).