Why do programs (JVM) crash while there is still plenty of available space in pagefile?

1

So, very simple question indeed. With my RAM-limited dev machine (8GB of RAM, Win 7 x64, 8GB of pagefile), when I run out of available RAM, programs first start to slow down, and eventually crash. Most of the time JVM crashes first and very happily. How is this possible? Its like there is no pagefile at all, yet when I hit 8th gig of used RAM JVM (and sometimes other programs as well) crash almost instantly.

Yes, I know very well all paging mechanisms in place mainly by HW, which once again shoud work with pagefile as if there is plenty of RAM available knowing nothing about page file beeing used or even existing. So why do I actually observe very different behaviour?

user32569

Posted 2015-05-19T20:19:10.010

Reputation: 739

Why close votes? Windows memory management is driving me crazy sometimes, without any real explanation. So I though maybe someone has similiar problems. I would just like to know why is this happening. – user32569 – 2015-05-19T20:35:29.343

Java relies on garbage collection to release memory. A program with tight loops or one continually creating objects may not release memory promptly; and there is no way to force garbage collection (setting pointers to null is a hint to Java GC but does not immediately relinquish memory). I've encountered the same issue on Solaris OS as well as on Windows. – DrMoishe Pippik – 2015-05-19T21:33:16.087

Answers

0

Can you run jprofiler and investigate the heap memory. Also it is not clear the memory requirement for the java program in execution.Usually 8 GB of RAM is considered decent. If the java program is creating lot of thread and the threads are not terminated then it could cause all these issues. Please check the java program for the amount of object created and threading nature.

RAM

Posted 2015-05-19T20:19:10.010

Reputation: 1