This has been asked in an interview
views:
54answers:
2Yes you can, in fact, it tends to be. In most OS you can specify the amount of virtual memory you want to use; for example, in Windows go to your Control Panel -> System -> Advanced -> Performance -> Advanced. Here, you can specify the dimension of your virtual memory; i'm using 1.5GB of virtual memory and i've got 4GB of physical memory.
Check out the accepted answer for a more technical answer in this thread.
A process virtual memory size primarily depends on the CPU addressability, i.e. the address registers size. 4 GB for a 32 bit CPU and much more for a 64 bit one. How much of this addressable size is usable, i.e. can be populated will depend on the available space in both RAM and the swap area. Obvious cases where the maximum usable virtual memory size will always be smaller than the RAM size is when no swap area is set. In that case, as parts of the RAM aren't available to virtual memory (eg: physical RAM reserved by the BIOS, the kernel or a device driver) the usable VM size is always smaller than the RAM size.