Running out of application memory is the last thing you want when using a Mac, but it may happen in some cases, usually when you aren't expecting it – at least, according to Murphy's law. The symptoms are an unresponsive Mac, high memory pressure, and a dialog box appearing with a “Your system has run out of application memory” message. macOS then suggests quitting applications you're not using to avoid problems with the computer.
So what happened exactly? Does this mean the Mac doesn't live up to Apple's promise of delivering the best computing experience, with software and hardware working together in perfect harmony? Well, here’s everything you need to know about application memory…
macOS and Memory Management
Every Mac is equipped with limited hardware resources, which in this case is the RAM. At the moment of purchase it is best to max out the amount of physical memory the machine supports, but that obviously pushes up the final price. When on a limited budget, maxing out the RAM is best postponed for a secondary upgrade cycle, if applicable. We are aware of the extra cost that comes with installing optional physical memory to reach the hardware limits, but it's the best investment that can be made because that's one of the secrets to extending the lifespan of that Mac.
When an app is launched, its code, data, and processes are loaded into the physical memory of the Mac, in doing so increasing the memory pressure on the hardware resources of the computer. The more limited the hardware, the bigger the effect of this memory pressure. Ideally, the memory space where the application operates is isolated from other applications, providing more stability and security. This space is defined by Apple as the virtual memory of the application and is one of the key characteristics of the application as a process: all its threads will share the same virtual memory space.
Activity Monitor, or even third party apps such as iStat Menus, provides users a great overview of the current status of memory usage. Upon launching Activity Monitor, users will be presented with a memory pressure graph (or pie chart in OS X Mountain Lion and earlier), and next to that graph there is a breakdown of the available memory resources in three categories: memory used, cached files, and swap used.
The memory used category displays the total amount of memory currently in use by application and system processes. It includes three subcategories: app memory, wired memory, and compressed memory.
App memory defines the total amount of RAM used by the applications and their processes, while the wired memory is the amount of memory that cannot be compressed or paged out to the startup drive.
There is a twist with macOS, though: the space allocated to apps and their processes can be higher than the available physical memory, which is where ‘virtual’ memory comes in – and is the reason why it is called as such. This allows macOS to step beyond the limitations of physical RAM by creating a logical address space (or ‘virtual’ address space) for each process and divide it up into uniformly sized chunks of memory called pages. To maintain control of these pages, the processor and its memory management unit (MMU) maintain a page table.
How does this relate to app memory failure? Well, this usually happens under two circumstances:
- If the startup disk doesn't have sufficient space to create new swap files. To avoid this or address the issue as it arises, it is recommended to run Mac optimization apps such as CleanMyMac to free up space by eliminating junk and cached data from the computer.
- The amount of virtual memory has grown so big that the kernel cannot create an entry in the page table to keep track of the virtual address space, and so it will prompt macOS to produce an error message and suggest the user quits apps that they are not using. This usually happens when too many apps are running at once.
Does this mean that Macs aren't as good as Apple says they are?
No. Every Mac comes with certain hardware resources, which obviously imposes specific limits in terms of performance. The better the hardware and the more RAM your Mac has, the less likely you are to experience issues with performance. For those on a budget, however, it is worth adding that since Apple designs both software and hardware, macOS handles its hardware resources much better than other desktop operating systems. Which is what Apple likes to highlight at every opportunity.
Best Mac Optimization Software of 2020
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.