I have a program that fundamentally requires a lot of memory. However, for some reason java gives me an error when I try to set the max heap space above 1.5GB. That is, running
java -Xmx1582m [my program]
is okay, but
java -Xmx1583m [my program]
gives the error
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
I got the same error in both Windows command line and Eclipse.
Here are my system configurations:
Windows 7 (64-bit)
Intel Core 2 Quad CPU
Installed RAM: 8.00 GB
Java version 1.6.0
It is weird that I can only set 1.5GB memory even though I'm running 64-bit OS with 8 GB RAM. Is there a way to work around this?