Question

I have the JRE v1.6 that is 32-bit installed. When I attempt to run a program as follows:

java -Xms1024m -Xmx2048m net.analysis.MyProg

I see the following message displayed:

Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine

As far as I know, the maximum heap allowed for a 32-bit JVM is 2 GB. On the computer running my code there is 131061 MB of physical memory (using Window's Task Manager, 128 GB of RAM).

Does anyone know what am I doing wrong here?

Was it helpful?

Solution

In your case, the limit is most likely the 32 bit architecture and the way that Windows is apportioning the virtual address space.

According to the Oracle JVM FAQ, you can only expect to get 1.4Gb to 1.6Gb on a 32bit JVM on Windows.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top