简体   繁体   English

尽管有足够的内存,Eclipse将不再以Xmx设置为1024m开头

[英]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的虚拟空间,这对于以下情况是必需的:

  • application code 申请代码
  • DLLs, both application DLLs and shared DLLs like hooks DLL,应用程序DLL和钩子之类的共享DLL
  • java off-heap needs: code caches, buffers, etc. java堆外需求:代码缓存,缓冲区等
  • java heap itself Java堆本身

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.

相关问题 为什么我不能在eclipse.ini中将-Xmx设置为1024m? - Why I cannot set -Xmx to 1024m in eclipse.ini? java 启动选项“-Xmx512M -XX:MaxPerSize=1024M”不适用于我的 jvm - java startup option "-Xmx512M -XX:MaxPerSize=1024M" doesn't work for my jvm 将Xmx更改为1024m以外的值会导致启动失败 - Changing Xmx to something else than 1024m leads to failing startup 无法启动:-Xmx30G没有足够的内存 - Can't start up: not enough memory with -Xmx30G VM设置为最大1024m时出现Java OutOfMemoryError - Java OutOfMemoryError when VM is set to 1024m max (Apache Beam) 无法增加执行器内存 - 尽管使用了多个设置,它还是固定在 1024M - (Apache Beam) Cannot increase executor memory - it is fixed at 1024M despite using multiple settings java.lang.OutOfMemoryError: 物理内存使用率过高:physicalBytes (1100M) &gt; maxPhysicalBytes (1024M) - java.lang.OutOfMemoryError: Physical memory usage is too high: physicalBytes (1100M) > maxPhysicalBytes (1024M) Eclipse已停止工作,不会再启动 - Eclipse has stopped working and won't start anymore 使用-Xmx1024m的Java进程如何占用3GB驻留内存? - How can a Java process with -Xmx1024m occupy 3GB resident memory? 将文本文件加载到列表中时出现内存不足错误,即使我指定了足够大的xmx - Out of memory error when loading a text file in to List even though I have specified large enough xmx
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM