Farknot Architect/Shutterstock.com
Does your Mac regularly grind to a halt? Do you see the same pop-up complaining about a lack of memory, asking you to kill some apps? Here’s how to fix it and reduce the likelihood of it happening again.
Use the Force Quit Option to Kill Running Apps
macOS only showcases the “Force Quit Applications” window when it’s completely out of memory, including physical RAM and virtual memory on your boot drive.
When you see this window, you’ll need to force quit non-critical applications to stabilize your system. Apps you’re not using or those running in the background that you’ve forgotten about should be the first to go. Your system should become responsive again after you’ve gotten rid of a few apps.
In the window, you’ll see app names listed alongside the amount of RAM currently being used. Click on an app, then click “Force Quit” to kill it, but be aware that data will not be saved. If you’re working on a document in an app and you Force Quit, expect to lose work.
Sometimes the system will hang on this window when attempting to kill apps or resume from the problem state. You can be waiting minutes at a time for things to return to normal.
If you have unsaved work on the line, you must wait. Otherwise, you may want to restart your Mac by pressing and holding the power button until the machine turns off. Then, boot it up again.
RELATED: How to Restart Your Mac
Restart Your Mac for a Quick Fix
Even if you get macOS back to a usable state using the method above, there’s a good chance you’ll see the window again before long. Make sure you save anything you’re working on, and then restart your Mac using the Apple logo in the top-left corner of the screen. This will help free up as much memory as possible.
Consider unchecking “Reopen windows when logging back in” and only opening mission-critical applications in the future.
You can save physical and virtual memory by not loading unnecessary apps when your computer starts back up. It’s easy to see your startup items by going to System Preferences (System Settings) > User Groups > Login Items. Here, you can remove apps from the startup list by highlighting the app and clicking the minus (-) button.
Free Up Disk Space to Prevent the Error From Happening Again
macOS can manage physical memory (RAM) provided there is disk space to swap things in and out. The system takes things from physical memory and places them in virtual memory as and when they are needed.
You can get a good idea of this process by opening Activity Monitor and clicking on the “Memory” tab. At the bottom of the tab, you’ll see your “Physical Memory” total (how much RAM your laptop has inside it) and the “Memory Used” total (how much of the RAM is currently in use).
You’ll also see “Cached Files” listed, which are files that are frequently used by the OS that are swapped in and out of physical memory. “Swap Used” refers to the amount of space being used to swap files in and out of RAM.
When you run out of (or run especially low on) disk space, your system has nowhere to put cached files and no space left to swap them in and out. This is one of the reasons you’ll see a window asking you to free up memory by killing applications.
You can avoid this by maintaining the free space on your Mac.
Apple doesn’t specify how much free space your Mac needs to operate normally, but if you’re seeing this error frequently, there’s a good chance you’re not meeting the criteria.
As a rule, we recommend aiming for around 10% of your total disk space. There are plenty of ways to create free space on your Mac, like clearing out your Downloads folder, deleting apps you never use, or automatically emptying the Trash.
You can also swap files on your disk to another drive, like a thumb drive, hard drive, or a purpose-built drive that lives in your MacBook Pro’s SD card drive.
Avoid Doing Too Much at Once
If you’re frequently encountering the “Your system has run out of application memory” error and you’ve tried reducing your disk space, you may be rubbing up against the limitations of your system. This is more common on older Mac models that have less memory.
The key is to know the limitations of your system and to avoid pushing things too far. This might mean reducing the number of browser tabs open at once, taking care not to open too many resource-intensive applications (like photo editors or games) at once, and cutting down on background processes.
You can use Activity Monitor to see what processes are running on your Mac. You can also see background processes currently running in the top-right corner of your screen. Some processes, such as helpers for note-taking apps like Evernote or Duet Display can be prevented from loading until you need them.
To stop these processes, you’ll need to open each app’s preferences to disable the launch agent. The easiest way to do this is to use an app like CleanMyMac X to find launch agents and then disable them.
Above all else, make sure you keep a nice buffer of free space on your boot drive for macOS to manage your physical and virtual memory properly.
RELATED: How to Troubleshoot Your Mac With Activity Monitor
Isolate Apps with Memory Leaks
If the problem seems to be limited to the use of a specific application, you may have stumbled upon a memory leak. A memory leak is a software problem that causes an application to continually request more and more memory without ever reassigning it.
RELATED: What Is a Memory Leak, and What Can You Do About It?
You’ll have to be vigilant to see if your issue is more common when using specific apps. You can always take a look at the “Memory” tab in Activity Monitor (click on the “Memory” column to sort the list by usage) to see if there are any apps that seem to be using more than their fair share.
If you find an app that seems to be leaking memory, you can always kill it by highlighting it and then using the “X” button in Activity Monitor. If an update is available, try applying it to fix the issue.
Upgrade Your RAM (If You Can)
Mac upgradeability has been on the downward trend since Apple started soldering RAM to logic boards, sometime around the release of the retina MacBook Pro. And although it has performance benefits, the decision to go with unified memory didn’t help.
Some models are easier to upgrade than others, but none of the Apple silicon versions that use an M1, M2, or a similar chip can be upgraded in this manner.
Some older Mac models, particularly the Mac mini (2012, 2011, and 2010 models) and iMac (up to 2020 models with Intel processors) are remarkably easy to upgrade. The iMac even has a pop-out port on the back for easy installation.
Apple
Consult Apple’s recommendations for RAM types (like this iMac guide or this Mac mini guide) before buying to ensure you purchase the correct modules.
If your machine is old enough to have user-upgradeable RAM, don’t expect miracles in terms of performance improvements. If the RAM is especially expensive, you might be better off putting the money into a replacement Mac instead.
If the problem is caused by a chronic lack of disk space, you might want to upgrade your Mac’s SSD instead.
Consider Replacing Your Mac
For many users, seeing errors about the system running out of physical memory should be a cause to reflect on the age of the machine. This is especially true if your Mac is so old that it no longer receives software updates.
A new Apple silicon Mac will provide a big leap in performance over an older Intel model. There’s a Mac for almost every budget or requirement. For example, you can choose the M1 Mac mini, which features unbeatable performance for the price. Or the M1 Ultra-powered Mac Studio, which might be the fastest Mac on the market.
Source by www.howtogeek.com