MacOS – Why is Java using so Much Real Memory

javamacosmemory

Java is consistently listed as using 700MB of real memory. That is a nice chunk of change on my 4GB iMac. I don't even know that I am running a Java Application, ever.

Any ideas?

Best Answer

This is due to the nature of garbage collection technology used in Java. Freeing memory in such systems is delayed until some threshold reached, or out of memory happens, or some time passes. It is probably not using all those 700MB all the time (may as well be just 50 MB), but Activity Monitor has no way to look inside Java virtual machine and tell how much is actually used.

Normally, if there are no bugs or leaks (yes GC systems may leak too), Java should give up unused memory whenever your system runs out of it, so there is no need to worry right now. Said that, if you don't need the program, it won't hurt uninstalling whatever is starting it up.