Physical memory is a pivotal resource, and macOS provides developers with various ways to allocate it, depending on their needs. Combined with virtual memory, it allows the operating system to get the best out of the available hardware.
Every application operates in a memory space, where it holds its own code, data, and state. The more memory there is for an app, the better it performs, but that usually comes at a cost since that resource is then not there for other apps. Along with the CPU, memory is a highly important resource for any application, so Apple recommends that developers carefully plan their memory allocation strategy for a simple reason: these resources are limited, and optimal performance needs efficient memory allocation.
How Does macOS Handle Memory Usage?
Apple provides great built-in utilities to address performance-related issues, such as Activity Monitor and Disk Utility, but an incorrectly formulated label can easily mislead the user and send the wrong information about key aspects of the system, for example memory usage.
In earlier versions of Activity Monitor, Apple attached five labels to memory usage: free, wired, active, inactive, and used. While some of them are clear and easy to understand, labels such as “inactive” raise eyebrows and can confuse users, as they may start wondering how “inactive” differs from “free” and the potential waste of resources involved. That confusion opened up a market for memory cleaner apps offering ‘better memory management' services by freeing up ‘wasted’ memory.
How Apple Defines Memory Usage
Opening up Activity Monitor's Memory pane presents users with a variety of information: memory pressure, physical memory, memory used, swap used and cached files. Apparently, with OS X 10.9 Mavericks, Apple realized that the “inactive” term was not sending the right information, so they redesigned this Memory pane, rethought its labels and replaced the pie chart with a memory pressure graph that helps illustrate the availability of memory resources.
By using color the memory pressure chart easily highlights the current state of memory resources. If the graph remains green then the Mac has resources available, but yellow means more pressure with resources being used in memory management processes such as compression. The problem appears when the graph shows red, highlighting the fact that the machine's physical resources are basically empty, at which point the system starts to write the data to your startup disk.
The physical memory label is clear: it shows the amount of RAM you have installed in the Mac.
The “memory used” category includes three subcategories:
- App memory, which is the total amount of memory used by applications.
- Wired memory, which cannot be compressed, written to the startup disk, or shared, and must stay in the RAM.
- Compressed, which is the amount of memory that has been compressed to make room for other processes.
Some users are concerned about the presence of swap files on their computer occupying gigabytes of space. Swap is used by macOS for better memory management. It doesn't really matter if you have free RAM; there will be some activity in the swap section.
Under the “cached files” label you'll find data stored in RAM that was left there by recently closed apps, and this space is now available to other apps. It might be best to label this segment as ‘macOS knows best’, because this is how the system optimizes app performance. If you have been using Adobe InDesign, for example, and you've quit the app, then the memory resources used by the app's processes will then be available to other apps. However, if you then realize that you have forgotten to complete something and relaunch the InDesign app then doing so will take less time than originally, because that cached memory is quickly converted to app memory without the need to load its contents from the startup drive.
Should You Free Up Memory?
The hardware resources your Mac has are there to be used, not to just sit around. What is a waste is not the “inactive” memory, but the “free” memory. So if you see more memory pressure on the Mac but the Activity Monitor's graph doesn't turn red, then you are absolutely fine. Let the system manage its resources, because it will always do a much better job of it than you. Of course, there are cases where you may need to step in and free up memory – which CleanMyMac and other Mac optimization apps let you do – but you don't need to push that ‘panic’ button each and every time you see your system is running low on free memory. Just let it go, but don’t let that stop you keeping an eye on the Mac's performance, of course.
Best Mac Optimization Software of 2023
Get the Best Deals on Mac Optimization Software
Stay up to date on the latest tech news and discounts on Mac optimization software with our monthly newsletter.