I am running out of Memory

Hi I am a developer and I recently bought a Macbook Pro M5 16 GB, 1TB , but when I try to run cursor and Xcode I am out of memory , and even when I start the MacBook only open few safari tabs my laptop is using swap ram . what is the issue


[Edited by Moderator]

MacBook Pro 14″, macOS 27.0

Posted on Sep 23, 2026 1:40 AM

Reply
Question marked as Top-ranking reply

Posted on Sep 23, 2026 4:51 AM

Hi there

Please try this


Always Use Cmd + Q: Never just click the red close circle on a Cursor window. Always fully quit the application using Cmd + Q to guarantee all indexers and AI background tasks terminate cleanly. 

Limit Background Agent Tasks: If you are using Cursor's Composer feature, avoid letting multiple parallel agents run massive multi-file changes or deep repository indexing simultaneously, as this rapidly eats up 16 GB of RAM. 

Isolate Xcode Simulations: Xcode's iOS Simulator behaves like a virtual machine and consumes a large chunk of RAM. Quit the Simulator when you are strictly coding in Cursor and only launch it when you are actively testing. 

Check Storage Overhead: Ensure your 1 TB SSD has at least 50–100 GB of free space. If your storage gets too full, macOS will lose the physical space required to build the swap files, instantly throwing the "Out of Memory" crash error. 

5 replies
Question marked as Top-ranking reply

Sep 23, 2026 4:51 AM in response to Rimas The Boss

Hi there

Please try this


Always Use Cmd + Q: Never just click the red close circle on a Cursor window. Always fully quit the application using Cmd + Q to guarantee all indexers and AI background tasks terminate cleanly. 

Limit Background Agent Tasks: If you are using Cursor's Composer feature, avoid letting multiple parallel agents run massive multi-file changes or deep repository indexing simultaneously, as this rapidly eats up 16 GB of RAM. 

Isolate Xcode Simulations: Xcode's iOS Simulator behaves like a virtual machine and consumes a large chunk of RAM. Quit the Simulator when you are strictly coding in Cursor and only launch it when you are actively testing. 

Check Storage Overhead: Ensure your 1 TB SSD has at least 50–100 GB of free space. If your storage gets too full, macOS will lose the physical space required to build the swap files, instantly throwing the "Out of Memory" crash error. 

Sep 23, 2026 12:20 PM in response to Rimas The Boss

High Swap can be due to utility interference, even unneeded VPNs.


We may be able to spot somthing if you post an EtreCheck report. We can quickly and within the limitations of these forums help you determine what issues are at play without our playing a protracted game of "20 Questions" with you that could go on for days. 


EtreCheck Pro is available here: https://etrecheck.com/en/welcome.html


The free version will do nicely for this purpose, although the app is worthy of our financial support.


We can see hard data about drive performance, software issues and interferences, and RAM usage. Etrecheck is the development of a long-serving and trusted ASC contributor. It is a reporting app, not a "fix-it” app, expressly for displaying information in these forums to help us help you remotely. It will not reveal any personal or secure information.


Please see this excellent user tip on how to post long text reports like EtreCheck's into a forum response:


How to use the Add Text Feature When Post… - Apple Community


NOTE: Please post the entire report unedited. There are subtle hints there that may seem trivial to a new EtreCheck user, but can speak volumes to those of us who have evaluated thousands of them.


Sep 23, 2026 9:32 AM in response to WheelieNick

I have close all the apps , still when I start my Mac it use the swap memory , I had a custom build pc, I change to Mac because I thought the optimisation is better in Mac OS for developers . and now its upside down , I can't use my projects when with the Xcode when I start one project it goes to all the memories 0 and swap use 46GB . what the point you spend 600k and can't build what you want .

I am running out of Memory

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.