简体   繁体   English

想要将Java堆大小增加到4GB +:物理内存8 GB,JVM 64位

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

I want to run a memory intensive package on a web server. 我想在Web服务器上运行内存密集型软件包。

Current computer's settings are... Windows 7 64 bit 64-bit JVM RAM: 8GB 当前计算机的设置是... Windows 7 64位64位JVM RAM:8GB

When I try to run eclipse with -Xms1024m -Xmx2048m -XX:MaxPermSize=256m 当我尝试使用-Xms1024m -Xmx2048m -XX运行eclipse时: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. 初始化VM时出错无法为对象堆保留足够的空间无法创建Java虚拟机。

From posts that I read, it seems like I should be able to use more than 4GB of memory. 从我读过的帖子来看,似乎我应该可以使用超过4GB的内存。 When I ran the code, I was able to max out the memory at -Xmx1200M and still be able to run the code. 当我运行代码时,我能够在-Xmx1200M处最大化内存并仍然能够运行代码。 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. 问题是我使用的是32位版本的JDK。 I was able to run memory at 2GB after switching the JDK to the 64 bit version. 将JDK切换到64位版本后,我能够以2GB运行内存。 Thanks! 谢谢!

The problem was that I was using a 32-bit version of JDK. 问题是我使用的是32位版本的JDK。

Thank you, and thank you to Mister Smith for pointing out that I should answer it and mark it as solved. 谢谢你,谢谢史密斯先生指出我应该回答它并将其标记为已解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM