Want to increase Java Heap Size to 4GB+: Physical Memory 8 GB, JVM 64-bit

牧云@^-^@ 提交于 2020-01-14 14:28:06

问题


I want to run a memory intensive package on a web server.

Current computer's settings are... Windows 7 64 bit 64-bit JVM RAM: 8GB

When I try to run eclipse with -Xms1024m -Xmx2048m -XX:MaxPermSize=256m

I get:

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

From posts that I read, it seems like I should be able to use more than 4GB of memory. When I ran the code, I was able to max out the memory at -Xmx1200M and still be able to run the code. But for what I want to accomplish, I need to use more memory. How can I increase the memory size here?


Thank you everyone. The issue was that I was using a 32-bit version of JDK. I was able to run memory at 2GB after switching the JDK to the 64 bit version. Thanks!


回答1:


The problem was that I was using a 32-bit version of JDK.

Thank you, and thank you to Mister Smith for pointing out that I should answer it and mark it as solved.



来源:https://stackoverflow.com/questions/7276381/want-to-increase-java-heap-size-to-4gb-physical-memory-8-gb-jvm-64-bit

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!