I have 16GB RAM on my Linux machine and have set the maximum java heap memory to 4GB using -Xmx4096m argument. But I am getting the following error when i start my process.
Invalid maximum heap size: -Xmx4096m The specified size exceeds the maximum representable size. Could not create the Java virtual machine.
It works fine when i set the value to 2048m.
Is there any other configuration parameter that i need to change to increase the heap size ?
Thanks in advance!
its not only about how much RAM you have
on a 32 bit machine max heap available is 1628MB on a 64 bit machine max heap available is 2^64 (theoretically) but there are limitations
What OS are you using? Take a look at the Oracle Hotspot FAQ. Look out for the following section:
Why can't I get a larger heap with the 32-bit JVM?
If you are using a 32-bit system, lower it to 1.6G. For 64-bit systems, check the supported systems list in the link provided.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With