“Error code out of memory” means your device or program has run out of available RAM (random access memory) or virtual memory, and it can’t continue the current task. The fix is usually to close memory-hogging apps, restart the program or device, or increase the virtual memory (page file) — and the steps below walk you through each one for Windows, macOS, Android, and iOS.
What “Out of Memory” Actually Means
Memory in a computer is not the same as storage (the hard drive or SSD). RAM is fast, temporary workspace where the operating system, open apps, and current data live. When every byte of RAM is in use, the system tries to use a portion of the storage drive as “virtual memory” (called a page file on Windows and swap on macOS/Linux). If that space is also exhausted, or the system is configured with no virtual memory, you get an out-of-memory error.
There are two common variants:
- System-wide error: “Your system is running out of memory” or “Insufficient system resources” — the whole OS is low.
- Application-specific error: “Out of memory” in a specific program (browser, game, photo editor, database) — that app has hit a limit, often a 32-bit address space limit of 2 GB or 4 GB.
Knowing which one you see matters because the fixes differ.
Why It Happens: Common Causes
Memory errors rarely appear out of nowhere. Typical triggers include:
- Too many open apps or browser tabs — each one holds code and data in RAM.
- A memory leak — a program gradually consumes more memory over time and never releases it, often after hours of use.
- Insufficient RAM for the workload — editing 4K video, running virtual machines, or compiling large projects on a machine with 4 GB or 8 GB RAM.
- Virtual memory disabled or set too low — some users disable the page file to save space, which causes errors when RAM is full.
- 32-bit software — older programs can only address about 2 GB (or 4 GB with a special flag), regardless of how much RAM you have.
- Malware or a runaway process — a virus or a buggy background service can eat memory.
How to Fix It on Windows
Start with the simplest steps and move to more advanced ones if the error persists.
- Close memory-heavy apps. Press Ctrl+Shift+Esc to open Task Manager. Click the “Processes” tab and sort by “Memory” to see which apps use the most. Select one and click “End task.”
- Restart the program or your PC. A reboot clears the RAM and resets any leaked memory.
- Increase virtual memory (page file). Go to Settings → System → About → Advanced system settings → Performance “Settings” → Advanced → Virtual memory “Change.” Uncheck “Automatically manage,” select your drive, choose “Custom size,” and set Initial and Maximum to 1.5× your RAM (e.g., 12288 MB for 8 GB RAM). Click “Set” and restart.
- Check for a memory leak. If one app’s memory usage grows continuously in Task Manager, update it or try a different version.
- Run Windows Memory Diagnostic. Type “Windows Memory Diagnostic” in the Start menu, choose “Restart now and check for problems.” This tests for faulty RAM sticks.
- Disable unnecessary startup programs. In Task Manager → “Startup,” disable items you don’t need.
If the error persists after these steps, you may need to add more physical RAM (see “When to Upgrade” below).
How to Fix It on macOS
macOS manages memory differently, but the same principles apply.
- Check Activity Monitor. Open it from Applications → Utilities. Click the “Memory” tab to see “Memory Pressure” at the bottom. If the graph is red, your Mac is under memory pressure.
- Quit heavy apps. Select an app in Activity Monitor and click the “X” button. Or press Cmd+Q in the app itself.
- Restart your Mac. Apple menu → Restart. This clears inactive memory.
- Free up storage. macOS uses the startup disk for swap space. If the disk is nearly full, memory errors can occur. Delete unused files or move them to an external drive.
- Reset NVRAM/PRAM (Intel Macs only). Shut down, then turn on and immediately press and hold Option+Cmd+P+R for 20 seconds. This can fix memory allocation glitches on older Macs.
On Apple Silicon Macs, there’s no user-accessible virtual memory setting; the OS manages it automatically. If you constantly see memory warnings, you likely need more RAM or a lighter workload.
How to Fix It on Android and iOS
Mobile devices also hit memory limits, especially with games or heavy apps.
- Android: Go to Settings → Apps → see running apps. Force-stop apps you aren’t using. Clear the cache of a specific app (Settings → Storage → Cache). If the error is in a game, close other apps first. Restart the phone to clear RAM.
- iOS: Double-click the Home button (or swipe up from the bottom on Face ID models) to see the app switcher. Swipe up on apps to close them. Restart the iPhone by holding the power and volume buttons until the slider appears.
On both platforms, if a single app repeatedly crashes with an out-of-memory error, update the app or reinstall it. A corrupted app cache is a common culprit.
When to Upgrade Your RAM
If you regularly see out-of-memory errors with normal use, your RAM is likely insufficient for your workload. Here’s how to decide:
- 4 GB or less: Fine for basic browsing and office work, but will struggle with multiple tabs, video calls, or photo editing.
- 8 GB: Good for everyday use and light gaming. May hit limits with heavy multitasking or large files.
- 16 GB: Comfortable for most users, including gamers and content creators.
- 32 GB or more: Needed for 4K video editing, virtual machines, or large data analysis.
Before buying RAM, check your device’s specifications — many laptops have soldered RAM that can’t be upgraded. For desktops, you can often add sticks yourself. If you’re unsure, use a system information tool (like CPU-Z on Windows) to see your current RAM type and speed.
Preventing Future Out-of-Memory Errors
Once you’ve fixed the immediate error, these habits reduce the chance of it returning:
- Keep only the apps you need open; close background apps you aren’t using.
- Use a browser with built-in tab management (like tab suspenders) if you keep dozens of tabs open.
- Restart your device at least once a week to clear accumulated memory fragments.
- Keep your OS and drivers updated — updates often fix memory leaks.
- Run a malware scan if errors appear suddenly and frequently.
- If you use a 32-bit program that crashes often, look for a 64-bit version.
Frequently Asked Questions
Can an out-of-memory error damage my computer?
No, the error itself doesn’t harm hardware. However, if it happens while saving a file, you could lose unsaved data. Frequent errors may indicate a deeper problem like a faulty RAM stick, which can cause crashes and data corruption.
Why does my browser say “out of memory” when I have plenty of RAM?
Browsers are often 32-bit applications on Windows, so they can only use about 2 GB (or 4 GB with a special flag). Even if your system has 16 GB, the browser itself hits its own limit. Switching to the 64-bit version of the browser (most modern ones are) or closing tabs helps.
What’s the difference between RAM and virtual memory?
RAM is physical memory chips. Virtual memory is a portion of your storage drive that the OS uses as an overflow when RAM is full. It’s much slower than RAM, but it prevents crashes when memory demand spikes. If virtual memory is disabled or too small, out-of-memory errors become more likely.
Is it safe to disable the page file to free up disk space?
No, it’s not recommended. The page file is essential for system stability. Even if you have plenty of RAM, Windows uses it for certain operations. Disabling it can cause errors or crashes. Instead, let Windows manage it automatically or set a fixed size.
How do I know if I have a memory leak?
Open Task Manager (Windows) or Activity Monitor (macOS) and watch a specific app’s memory usage over time. If it grows steadily without you doing anything, that’s a leak. Restarting the app resets it, but you should update or replace the app to fix the root cause.
Will adding more RAM always fix the error?
Usually, yes, if the error is due to insufficient physical memory. But if the error is caused by a 32-bit app limit, a memory leak, or a corrupted system file, adding RAM won’t help. Diagnose the cause first.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Gmail Gemini Privacy: Data Access & Limit Settings
- Fix Outlook Inbox Corruption with DISM in Windows
- How to Set Up Apple Pay on iPhone
- How to Choose a Refurbished iPhone With Years of Support
- Turn Off Message Notifications on Mac
- Spotting Outside Windows: Step-by-Step Guide