Is there any way to empty the compressed memory used by an app without restarting this app?

Apps like Memory Cleaner or the purge command do not work!

1 Answer 1


No, there's no way to do so.

If you could empty the compressed memory used by an app, the app would stop functioning and crash. Therefore it doesn't make sense to empty the compressed memory of running apps.

  • Let me explain better. I use a type of media server, 24 hours on. Usually the used compressed memory is 0, but every time someone pdownloads a file, it increases some useless MBs in compressed memory. I know it's a flaw in the program, but I need it. Compressed memory keeps expanding till it lock the mac, unless I restart the app.
    – Vilefort
    Sep 25, 2017 at 18:40
  • Then you have to either fix the bug in the app, or restart the app. Without specialised knowledge about the app, you cannot conclude that the data stored in compressed memory will never be accessed by the app. If you remove that memory and the app tries to access it, it will crash.
    – jksoegaard
    Sep 25, 2017 at 20:08
  • If it is indeed memory leaks, and the memory will never be accessed again, you could theoretically attach to the process as a debugger, and then force a call to free the memory segment that is leaked. This is however only possible if the memory is allocated with mmap - or alternatively, if allocated by brk/sbrk, only if the leaked memory is at the end of the memory region. Again, this is only possible with specialized knowledge about the application, and would normally require for you to be a programmer yourself to understand how to do this.
    – jksoegaard
    Sep 25, 2017 at 20:09
  • Thank you Jksoegaard , i will try the path you suggest! Unfortunately I can not change the software because it does not belong to me. Surely I will do several tests before using it to check if the comp.memory is not being used, but the worst that can happen is the software hangs, something that will happen the same way if I do not restart it. So i see no problems in try it ! Thanks again
    – Vilefort
    Sep 26, 2017 at 13:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .