开发者

increasing heap size in java program gives problem

开发者 https://www.devze.com 2022-12-21 09:03 出处:网络
i am using a java program which requires a lot of ram. ( Ideally i would want to give it 10 GB of ram )

i am using a java program which requires a lot of ram. ( Ideally i would want to give it

10 GB of ram )

this program is run using a bat file. which开发者_Go百科 has the following command to set java heap size

java  -Xmx896m weka.gui.explorer.Explorer

which allocates it 896 MB.

I am running this program on a high end 64bit server with windows 2003 64bit standard OS.

when i try to change the bat file to increase heap size to lets say 1.8 GB by using

java  -Xmx1896m weka.gui.explorer.Explorer

it gives an error message - "Could not reserve enough space for object heap " and the program doesnt start

how can i give this program a greater heap size atleast upto 4 GB


Did you try using -d64 to specify JVM to use 64 bit version?

java -d64 -Xmx2g weka.gui.explorer.Explorer

Just for information, that error should raise when JVM is trying to call mmap function to obtain the address space for the heap from operating system with an invalid size.

0

精彩评论

暂无评论...
验证码 换一张
取 消