My 2015 Mac Book pro is running low on memory, and so it has switched to using the swap space. Though now the swap space is taking up all the computer's virtual memory. Is there any way to delete the swap space. I usually restart the computer to get back that space, but there has to be a smarter and easier way to get back that space.
https://i.sstatic.net/nyiT7.png
Out of disk space: https://i.sstatic.net/FWV8J.png
Also is there anyway to find out how that space is being used, like which applications are using the swap space?