/
/

How to Fix the “Not Enough Memory to Complete This Operation” Error in Windows 11

by Ann Conte, IT Technical Writer
How to Fix the “Not Enough Memory to Complete This Operation” Error in Windows 11 blog banner image

Instant Summary

This NinjaOne blog post offers a comprehensive basic CMD commands list and deep dive into Windows commands with over 70 essential cmd commands for both beginners and advanced users. It explains practical command prompt commands for file management, directory navigation, network troubleshooting, disk operations, and automation with real examples to improve productivity. Whether you’re learning foundational cmd commands or mastering advanced Windows CLI tools, this guide helps you use the Command Prompt more effectively.

Key Points

  • Adjust virtual memory settings manually: Resolve system-wide memory errors by configuring a custom paging file size between 1.5x and 3x of your installed RAM to ensure Windows has adequate swap space for demanding tasks.
  • Modify desktop heap in the registry: Increase the SharedSection value within the Windows Registry to allocate more resources for multi-user RDP sessions and environments running a high volume of simultaneous applications.
  • Run system repair and maintenance tools: Execute System File Checker (SFC) and DISM commands via Command Prompt to identify and repair underlying file corruption that disrupts how Windows 11 manages memory allocation.
  • Identify and replace 32-bit legacy software: Monitor the Task Manager to find 32-bit applications limited to 4GB of RAM and upgrade to 64-bit versions to fully utilize your system’s physical memory capacity.
  • Address memory leaks and temporary file bloat: Use Resource Monitor to terminate background processes with uncontrolled memory consumption and run Disk Cleanup to remove shell extensions and temporary files that trigger Explorer crashes.

Sometimes, Windows 11 users may encounter the “Not enough memory to complete the operation” error. It can be caused by opening large files, running demanding applications, or performing different processes. Even if they have enough computer RAM, users find that they can’t perform these tasks. Learning how to address these errors is essential to maintaining optimal performance and a smooth workflow.

If you prefer a visual explanation, watch our video on How to Fix the “Not Enough Memory to Complete This Operation” Error in Windows 11

Troubleshooting Checklist

PriorityActionTarget Issue
The “Cold” RestartDisable Fast Startup and Restart.Clears fragmented kernel memory and “ghost” errors.
Virtual MemoryAdjust Paging File (Method 1).Fixes general system “Out of Memory” popups.
Registry FixModify Desktop Heap (Method 2).Best for RDP sessions or many open app windows.
System RepairRun SFC and DISM (Method 3).Repairs underlying Windows file corruption.
The Version CheckSwap 32-bit apps for 64-bit (Method 4).Bypasses the 4GB RAM limit on legacy software.
Close “Leakers”Use Resource Monitor (Method 5).Identifies and stops buggy background processes.
Space SaverRun Disk Cleanup (Method 6).Fixes File Explorer crashes and thumbnail errors.

6 methods to deal with the “Not enough memory to complete this operation” error in Windows 11

There are several causes for this error, and you’ll need to address them to properly deal with the error. Depending on your situation, you can adjust your device’s virtual memory, make edits to the Windows Registry, run System File Checker and DISM, check if you’re using a 32-bit application, or clean up your temporary files and shell extensions.

Prerequisites for addressing the “Not enough memory to complete this operation” error

  • Administrator privileges are required. To check if you have the necessary permissions, open the Start Menu, click Settings, and select Accounts. The word “Administrator” should be printed under your username.
  • Close any unused programs to free up memory.
  • Find out if the error applies to the whole system or to specific applications.
  • Back up your system and registry before making any changes to avoid any unintended consequences.
  • Disable “Fast Startup” temporarily. Windows 11 often saves the system state to the disk instead of a full refresh. To ensure a clean memory state, go to Control Panel > Power Options > Choose what the power buttons do, click “Change settings that are currently unavailable,” and uncheck Turn on fast startup. Perform a full restart.

Method 1: Adjust Virtual Memory (paging file)

Inadequate virtual memory is one of the leading causes of this error.

  1. Open the Start Menu. Click Settings. Select Systems > About.
  2. Under Related links, select Advanced system settings.
  3. Go to the Advanced tab.
  4. Under the Performance section, select Settings.
  5. Go to the Advanced tab and select Change under Virtual Memory.
  6. Uncheck Automatically manage paging file size.
  7. Select Custom size.
  8. Set the initial size to 1.5x of your installed RAM in MB, and set the Maximum size to 3x of your installed RAM in MB.
  9. Click Set > OK.
  10. Restart the computer to apply the changes.

Note for SSD Users: While the 1.5x rule is a classic standard, modern NVMe and SATA SSDs handle memory swaps differently. If you have 16GB of RAM or more, setting a massive paging file (e.g., 48GB or 96GB) can be a waste of storage. In high-RAM systems, a fixed Custom size of 8192 MB (8GB) is often enough to satisfy Windows’ requirement for a paging file without compromising disk space.

Method 2: Modify desktop heap size in Windows Registry (advanced)

This is useful in RDP sessions or in environments that have a lot of applications and services running.

  1. Open the Start Menu and search for Registry Editor to open the program.
  2. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems
  3. Double-click the Windows value.
  4. In the Value data box, find SharedSection. The third value, usually 768, is for the non-interactive Desktop heap. Increase the value to 1024 or 2048, especially if you’re seeing frequent errors in multi-user sessions.
  5. Click OK.
  6. Restart your computer to apply the changes.

Caution: When modifying the SharedSection, do not set the third value higher than 8192. Exceeding this limit can starve the system kernel of necessary resources, which may result in a system crash or “Blue Screen of Death (BSOD)” upon reboot.

Method 3: Run System File Checker and DISM

Underlying corruption can affect system memory handling. System File Checker and DISM can address this issue.

  1. Open the Start Menu, search for Command Prompt, right-click, and select Run as administrator.
  2. Run the following script:

sfc /scannow

Then:

DISM /Online /Cleanup-Image /RestoreHealth

  1. Restart your computer after the scans are complete.

Method 4: Check for 32-bit app memory limits

You may also want to check if the app is 32-bit or 64-bit. Most Windows 11 apps are 64-bit, but some legacy apps may still be 32-bit. 32-bit apps have memory limitations and may not be capable of completing certain tasks.

  1. Right-click on the taskbar > Task Manager.
  2. Go to the Details tab. If the process is 32-bit, it will be labeled as such.

If you find that you are using a 32-bit application, check if there is a 64-bit version available to prevent the error from happening again.

Method 5: Identify “Memory Leaks” via Resource Monitor

Sometimes the error is caused by a specific application with a “memory leak”—a bug where a program requests RAM but never releases it.

  1. Press Win + R, type resmon, and press Enter.
  2. Click the Memory tab.
  3. Observe the Commit (KB) column. This represents the total memory (Physical + Virtual) an application is using.
  4. If a non-essential background process (like a peripheral lighting controller or a browser helper) shows an unusually high or constantly growing number, right-click it and select End Process.
  5. Check for a software update for that specific application to prevent the error from returning.

Method 6: Clean up temporary files and shell extensions

Temporary files, thumbnails, or preview handlers can cause memory errors in Windows Explorer.

  1. Press Win+R, type cleanmgr, and press Enter. This will launch Disk Cleanup.
  2. Check the files you wish to delete and press OK.
  3. You can also download and run ShellExView to view and delete shell extensions from your system.

Additional considerations when addressing the “Not enough memory to complete this operation” error

  • You can check Event Viewer to view the logs on memory-related errors. Here are the steps to do that:
    1. Press Win+R, type eventvwr > Enter.
    2. Navigate to Windows Logs, then to either System or Application, depending on what you want to check.
    3. Look for the event IDs 2004, 2019, or 2020 and double-click to view the logs.
  • You can use Resource Monitor to monitor memory usage and identify the cause of the issue. To do that, press Win+R, type resmon.exe, and press Enter.
  • You can also run the Windows Memory Diagnostic Tool to identify the problem. To do that, press Win+R, type mdsched.exe, and press Enter. Once the program launches, follow the prompts on the screen.
  • Some devices have chipset and BIOS limits on addressable RAM and will not be able to go beyond that.

Common causes of the “Not enough memory to complete this operation” error

  • The virtual memory is misconfigured or insufficient.
  • There is a large desktop heap size limit for user sessions.
  • File Explorer is having shell extensions or thumbnail generation issues.
  • You’re using a legacy app that is still 32-bit. This has memory limitations and may not be able to handle your current tasks.
  • There is a memory leakage because of third-party applications.
  • The error is due to system limitations, especially in situations that involve heavy multitasking.

Why fix this error?

The main reason to address this error is that it will prevent disruptions in a user’s workflow and system operations. It can help avoid crashes, especially for people who work in high-memory use environments, such as video editing and web development.

Addressing this error will also restore your ability to take full advantage of a computer’s RAM. You’ll be able to open large files and applications. You can ensure optimal performance for the devices you manage and stable deployments in enterprise environments.

Addressing the “Not enough memory to complete this operation” error in Windows 11

The “Not enough memory to complete this operation” error in Windows 11 often stems from virtual memory configuration, 32-bit app limits, or registry constraints. You can address these issues by increasing the size of your Virtual Memory for system stability, modifying the desktop heap for multi-session environments, ensuring that you’re using 64-bit applications, or using SFC or DISM to address system file corruption.

FAQs

This error is often not about your physical RAM sticks, but rather how Windows manages memory addresses. It can be triggered by a 32-bit application hitting its hard 4GB limit, a “memory leak” where a program fails to release RAM back to the system, or a paging file (virtual memory) that is too small to handle the current workload.

The desktop heap is a specialized memory pool used for storing menu objects, windows, and icons. In multi-session environments like Remote Desktop (RDP), this heap can fill up quickly. Increasing the SharedSection value in the Registry allocates more “breathing room” for these graphical elements, preventing the “Not enough memory” prompt during heavy multitasking.

While the 1.5x RAM rule is a standard guideline, users with 16GB of RAM or more on an SSD can often set a fixed custom size of 8192 MB (8GB). This provides enough overflow space for Windows stability without consuming massive amounts of storage. Always remember to click “Set” and restart your computer for these changes to take effect.

Yes. Windows 11’s Fast Startup feature saves a snapshot of the system state to the disk instead of performing a full shutdown. Over time, this can lead to fragmented kernel memory and “ghost” errors. Disabling Fast Startup and performing a “cold” restart is often the first and simplest troubleshooting step for memory issues.

Open the Task Manager and go to the “Details” tab. Look at the application name; 32-bit apps are often explicitly labeled with “*32” or “32-bit.” Because these apps cannot access more than 4GB of RAM, they are the most likely culprits for memory errors when processing large files or complex data.

You might also like

Ready to simplify the hardest parts of IT?