Short description of a problem: Operation system (Windows 7 x64) failed to create JVM while another C++ program has already fragmented the memory.
Details of the problem: I have a workstation with 8 or 16 GB RAM. When I start my JVM program (which requires up to 2 GB RAM) it works fine. It works fine because JVM can allocate a big continuous piece of memory. But if I try to start C++ program (and I can say the program uses new and delete operations VERY often) JVM won’t start despite large amount of free memory. The obvious solution is to start the JVM program first. Problems will start if the JVM program crashes. In such case I have to either start the JVM program (while OS have a big continuous piece of memory) or restart the C++ program.
Question: Can I somehow reserve memory of operation system exactly for JVM (in spite of potential crashes)? And can I keep the memory while OS runs?