64位的java不会分配超过2GB的堆内存 [英] 64-bit java won't allocate more than 2GB of heap memory
问题描述
我的eclipse.ini中有这个:
-Xmx8g
我想让它使用我所有的记忆。
这可能是由于32位版本的eclipse?我不知道我有什么日食。
我在运行程序时尝试在
-Xmx8g
中发送给VMArgs。
我正在运行64位Windows 7和64位JRE。
它看起来像VMArguments根本不在eclipse中工作。
更改DEFAULT VM参考eclipse工作(终于!):
)将虚拟机参数插入到JRE中:在Eclipse打开的时候,打开首选项(对于Windows:位于Windows菜单项下的Mac菜单项下):打开Java部分,单击已安装的JRE,单击在JRE被使用(可能将是jre6),单击编辑...按钮,并将其插入默认VM参数:
-Xms256M -Xmx8192M
I'm running my program from eclipse and using 64-bit java, but I still can't get it to allocate more than 2GB of memory. I'm running some benchmarks so I need a lot of memory.
I have this in my eclipse.ini: -Xmx8g
I want it to use all my memory. Could this be due to a 32-bit version of eclipse? I'm not sure what I have for eclipse.
I've tried sending in -Xmx8g to VMArgs when running the program. I'm running 64-bit windows 7 and a 64-bit JRE.
After trying everything else, it looked like VMArguments were simply not working in eclipse.
Changing the DEFAULT VM args within eclipse worked (finally!):
Inserting VM arguments into your JRE: while Eclipse is open, open up Preferences (for Windows: located under Window menu item. for Mac: located under Eclipse menu item), open the Java section, click on Installed JREs, click on the JRE being used (probably will be jre6), click on the Edit... button, and insert this into the Default VM Arguments:
-Xms256M -Xmx8192M
这篇关于64位的java不会分配超过2GB的堆内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!