What happens when you start a program but the operating system doesnt have enough RAM to run it?

Does your Windows 10 or Windows 11 installation feel like it slows down over time? You're not imagining it. As the hardware requirements for popular apps increase, your aging hardware suffers.

Often there is a simple culprit: low memory. If you don't have enough system memory, your system will slow to a crawl when you attempt to run multiple resource-intensive programs.

Here's how you fix your Windows 10 or Windows 11 virtual memory size to make those issues disappear.

What Is Virtual Memory?

Your computer has two types of memory: A hard drive or solid-state drive and RAM.

Your hard drive is where your operating system lives, as well as your photos, music, games, documents, and otherwise. Your RAM stores program-specific data. It is much faster but also more volatile, acting as a working storage area for the programs and files you have open.

So, what is virtual memory?

Well, if you use all the RAM available to your system, it will utilize virtual memory—also known as a swap or paging file—to provide a temporary expansion. Your system's virtual memory does this using part of your hard-drive memory to expand your RAM effectively. So, this virtual memory is extremely useful. It allows your system to handle more data for more programs than previously available.

However, your hard drive memory (and even a faster solid-state drive) is much slower than your superfast RAM, so your performance can suffer.

When your memory runs low, the paging file comes into play. Some data stored in the RAM will move to the paging file, providing additional space for high-speed memory functions.

Running Low on Virtual Memory

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. For more information, see help.

Manually increasing the size of your paging file will alleviate this message, as per the error message. Windows sets the initial virtual memory paging file equal to the amount of installed RAM. The paging file is a minimum of 1.5 times and a maximum of three times your physical RAM.

You can calculate your paging file size using the following system. For example, a system with 4GB RAM would have a minimum of 1024x4x1.5=6,144MB [1GB RAM x Installed RAM x Minimum]. Whereas the maximum is 1024x4x3=12,288MB [1GB RAM x Installed RAM x Maximum].

Still, 12GB for a paging file is enormous. I would not recommend using the upper limit. Why? Because once your paging file increases over a certain size, your system will become unstable. In that, the paging file is a temporary fix.

How to Increase Your Virtual Memory

The natural question to ask is, "How much virtual memory should I set?"

Here's how you increase the size of the paging file to get rid of the virtual memory error message.

  1. Head to Control Panel > System and Security > System.
  2. Select Advanced System Settings to open your System Properties. Now open the Advanced tab.
  3. Under Performance, select Settings. Open the Advanced tab. Under Virtual memory, select Change. Here are your Virtual Memory options.

Please note that on Windows 11, you can take a less circuitous route to your Advanced System Settings.

  1. Press Windows key + I to open the Settings app.
  2. Head to System > About.
  3. Select Advanced system settings.
  4. Under Performance, select Settings. Open the Advanced tab. Under Virtual memory, select Change. Here are your Virtual Memory options.

system properties advanced tab

The default option is to Automatically manage paging file size for all drives. Uncheck this to enable the currently greyed-out section below. Select the drive you want to edit the paging file size for. Usually, this is your C: drive.

virtual memory
paging file

Now, select Custom size. Set the Maximum size you want for your paging file, following the recommended size for your system. Remember, Windows restricts the paging file size to three times the size of your installed RAM. This is to ensure system stability. Set the Initial size to the Currently allocated size (found below).

virtual memory set custom size

Click Set followed by OK. You have successfully increased your system's virtual memory size. +1 knowledge for the day!

Please note that Windows doesn't display a warning for paging file (virtual memory) size increases, but system alerts are shown for decreases. A sudden decrease could cause system damage.

Other Ways to Increase Your Virtual Memory

If you find that your system still runs slowly following the paging file size adjustment, you must consider upgrading your RAM.

Upgrading your RAM is the only way you can increase your virtual memory, by increasing the amount of overall memory available to the system. In that, you will alleviate the virtual memory issue during the process and could see a boost to your system speed, too.

There are countless tutorials to help you through this task, both text and video, and many can be found specifically for your device. A great place to start figuring out compatible RAM is PC Part Picker.

What Are the Best Virtual Memory Settings?

I'm inclined to leave my virtual memory settings alone. Windows 10 and Windows 11 manage your physical memory and your virtual memory, along with it. If you keep hitting the paging file memory limit, you should consider upgrading your RAM. It will make a world of difference, especially for older systems.

What happens if a computer runs out of RAM while running a program?

So what happens when your computer runs out of RAM? The easy answer to that question: Your computer will start to work less efficiently. That's because when your computer runs out of memory it will start to use the hard drive space for "virtual memory" to compensate.

When there is not enough RAM to store all the running programs?

When a program is loaded from the hard disk drive, the program instructions are copied into RAM. 3 Explain what happens when there is not enough RAM to store all of the required data. When the RAM is full, the operating system will 'swap out' some of the data to a file on the hard disk drive.

What happens when the operating system needs more RAM?

Typically, a newer version of an OS demands more memory than its predecessor. Adding more memory when you upgrade your OS ensures a smoother transition, prevents potential problems, and optimizes the performance of your system.

When a system does not have enough memory to execute all processes at once?

8.2 Swapping. A process must be loaded into memory in order to execute. If there is not enough memory available to keep all running processes in memory at the same time, then some processes who are not currently using the CPU may have their memory swapped out to a fast local disk called the backing store.