想要将Java堆大小增加到4GB以上:物理内存8 GB,JVM 64位 [英] Want to increase Java Heap Size to 4GB+: Physical Memory 8 GB, JVM 64-bit
问题描述
我想在Web服务器上运行内存密集型程序包.
I want to run a memory intensive package on a web server.
当前计算机的设置为... Windows 7 64位 64位JVM 内存:8GB
Current computer's settings are... Windows 7 64 bit 64-bit JVM RAM: 8GB
当我尝试使用 -Xms1024m -Xmx2048m -XX:MaxPermSize = 256m
When I try to run eclipse with -Xms1024m -Xmx2048m -XX:MaxPermSize=256m
我得到:
VM初始化期间发生错误 无法为对象堆保留足够的空间 无法创建Java虚拟机.
Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine.
从我阅读的帖子中看来,我应该能够使用超过4GB的内存. 运行代码时,我可以在-Xmx1200M处最大化内存,但仍然可以运行代码.但是对于我想完成的事情,我需要使用更多的内存.如何在此处增加内存大小?
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?
谢谢大家.问题是我使用的是32位版本的JDK.将JDK切换到64位版本后,我能够以2GB的速度运行内存.谢谢!
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!
推荐答案
问题是我使用的是32位版本的JDK.
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.
这篇关于想要将Java堆大小增加到4GB以上:物理内存8 GB,JVM 64位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!