[英]Eclipse won't start with Xmx set to 1024m anymore, though there is enough memory
My Eclipse (or, more specific, Spring Tool Suite) version is: 我的Eclipse(或更具体地讲,Spring Tool Suite)版本是:
Version: 3.6.3.RELEASE
Build Id: 201411281415
Platform: Eclipse Luna SR1 (4.4.1)
It worked fine, until recently, when I started getting the following error after opening Eclipse: 直到最近,当我打开Eclipse之后开始出现以下错误时,它的运行情况都很好:
Error: Could not create the Java Virtual Machine
Error: A fatal exception occured. Program will exit.
My start options include -vm <path to javaw> -vmargs -Xmx1024m -XX:MaxPermSize=256m
, I am using jdk1.7.0_79, the 32 bit version, on a 64bit Windows. 我的启动选项包括
-vm <path to javaw> -vmargs -Xmx1024m -XX:MaxPermSize=256m
,我在64位Windows上使用32位版本的jdk1.7.0_79。
I discovered, when setting -Xmx to 768m, Eclipse will start most of the time. 我发现,将-Xmx设置为768m时,Eclipse将在大多数时间启动。 I also noticed that starting eclipse began to fail when I installed the MySQL service;
我还注意到,当我安装MySQL服务时,启动eclipse开始失败。 if I deactivate it, the Task Manager shows me I have roughly 4gb of 16gb of RAM consumed;
如果我停用它,则任务管理器会向我显示我已消耗了大约4gb的16gb RAM; with MySQL running, that value increases to 5gb.
在运行MySQL的情况下,该值增加到5gb。
What is the reason, when there are 5gb consumed and roughly 11gb of RAM left, that no JDK can be created, and is there a known workaround? 是什么原因造成的,当消耗5gb的内存和大约11gb的RAM时,无法创建JDK,并且有已知的解决方法吗?
It is likely because of lack of virtual address space. 可能是因为缺少虚拟地址空间。 Remember that 32-bit processes have only 2GB of virtual space, which is needed for:
请记住,32位进程只有2GB的虚拟空间,这对于以下情况是必需的:
So, physical RAM is unrelated. 因此,物理RAM是无关的。
What likely happened? 可能会发生什么?
Eclipse grew heavier so JVM needs more off-heap to function Eclipse变得越来越重,因此JVM需要更多的堆外资源才能运行
What you can do? 你可以做什么?
Uninstall unneeded plugins, shut down your antivirus or other software that could intervene with Eclipse, use 64bit java. 使用64位Java卸载不需要的插件,关闭您的防病毒软件或其他可能会干扰Eclipse的软件。 64bit apps are faster on modern processors + 64-bit java uses compressedOps so it could make sense.
在现代处理器上,64位应用程序运行速度更快+ 64位Java使用CompressedOps,因此这很有意义。
In the past i had simlar issues, but no solution. 过去我有类似的问题,但没有解决方案。 I reached the limit with
-Xmx1500m
. 我达到了
-Xmx1500m
的限制。
See also Maximum Java heap size of a 32-bit JVM on a 64-bit OS . 另请参见64位OS上的32位JVM的最大Java堆大小 。
Is using the 64 bit Version of the JDK no option? 使用64位版本的JDK是否没有选择?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.