How do I troubleshoot the "Your system has run out of application memory" pop-up in macOS Sonoma?
Background:
My employer has provided me with a MacBook Pro M3 Pro with 36 GB of RAM. Incredibly, after about 5 days of uptime, I started getting the "Your system has run out of application memory" pop-up. Activity Monitor said swap was about 36 GB.
It seems likely that something is leaking memory.
Closing the applications showing highest memory usage by both Activity Monitor and ps ax -o vsz,pid,comm | sort -n did not make a significant difference on memory pressure.
After rebooting the machine and using it for several hours, memory pressure is green and swap is 0 bytes. I can't say whether the issue is fixed because, the first time, it happened after several days of uptime.