My M2 Air has been running like crap lately. I have about 45gig of HD space left. However, I keep getting out of memory errors and the force quit box keeps popping up. What can I do to fix this? Seems odd that Safari is using so much RAM
Do you have any Safari extensions installed?
Two issues cause one annoying problem.
1.Safari should not use 48GB memory. Mine, with 12 tabs opened and used, is using 2.1GB. Restart, reduce number of tabs, clear cache, check extensions, all suggested above. There are on line instructions, google it.
2. 45GB free space on HD (actually SSD) is not enough, especially if your Safari is using 48GB memory. You do not have 48GB RAM available, so MacOS caches Safari stuff onto SSD. But if your SSD is running out of space, well, things break and system gives these messages. Therefore, you should clear some SSD space - delete some files, unload apps, simply create more space. May be delete snapshots which TimeMachine always creates, even when it is not used (yeah, I know, weird). Disk Utility (part of MacOS) can delete snapshots.
Note, that it takes some time before deleted space becomes available, give it multiple hours (while running) before your start asking why you do not see more space.
Also, SSD do not like to run too full. You can find explanation on line, but if you fill them above 80-90% (estimates vary), they will become much slower as saving new data becomes more difficult. Filling SSD fully results in system crash and real difficulties to recover. Have done that, do not do it.
I feel all you did is made enough room on your SSD to have some swap space for your 48GB Safari which is crazy and feels impossible even with 500 pr0nhub tabs open at once.
open up activity monitor app in Apps -> Utilities and go to the memory tab and type 'safari' in the top left search bar to filter things.