I have been asked in an interview if virtual memory is infinite? I answered saying that it is not infinite. Then the interviewer asked the explanation and what I suggested was that in windows we do have a manual way to configure virtual memory to a certain limit.
I would like to know if Virtual memory is really Infinite?
If your virtual memory runs low, you will encounter the following message: Your system is low on virtual memory. Windows is increasing the size of your virtual memory paging file. During this process, memory requests for some applications may be denied.
The Maximum size is three (3) x the initial size. So let's say you have 4 GB (1 GB = 1,024 MB x 4 = 4,096 MB) of memory. The initial size would be 1.5 x 4,096 = 6,144 MB and the maximum size would be 3 x 6,144 = 18,432 MB."
Virtual memory uses both hardware and software to enable a computer to compensate for physical memory shortages, temporarily transferring data from random access memory (RAM) to disk storage.
If your system has to rely too heavily on virtual memory, you will notice a significant performance drop. The key is to have enough RAM to handle everything you tend to work on simultaneously -- then, the only time you "feel" the slowness of virtual memory is is when there's a slight pause when you're changing tasks.
First of all, forget the idea that virtual memory is limited by the size of pointers on your machine.
Virtual memory limits are not the same as addressing space. You can address more virtual memory than is available in your pointer-based address space using paging.
For an excellent overview, which addresses various misconceptions, see the following:
http://blogs.msdn.com/b/ericlippert/archive/2009/06/08/out-of-memory-does-not-refer-to-physical-memory.aspx
If nothing else then virtual memory is going to be limited by the amount of disk space available, this sadly is far from infinite.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With