为什么Eclipse会崩溃Xmx,XX:MaxPermSize高于某些值? [英] Why does Eclipse crash with Xmx, XX:MaxPermSize above certain values?

查看:143
本文介绍了为什么Eclipse会崩溃Xmx,XX:MaxPermSize高于某些值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行Eclipse 3.5.1,JDK 1.6.0_17在WinXP SP3 32Bit与3.5 gig的RAM。

我知道已知的 Eclipse最佳实践,仍然试图找出eclipse.ini。



这将启动: -Xmx588m ,这不会: -Xmx589m

-XX:MaxPermSize 相同。任何高于 -XX:MaxPermSize = 140m 的内容不会启动。

死亡屏幕与这个(取自

请参阅这个eclipse bug < a>。



一般问题是jvm需要连续的内存块。在Windows上,该进程将获得2Gig,其他加载的库被放置在内存空间的不同区域。如果一个图书馆碰巧被放置在中间,基本上会削减一半的大小,你可以使用。



Eclipse启动器将加载一些系统dll来做图形,特别是,user32.dll可能导致第三方库加载取决于您的计算机上安装的内容(见这里)。



为了实现更高的内存限制,您可以强制将jvm分散到单独的进程中eclipse发射器。在vm初始化其内存之后,jvm进程将不会加载这些额外的库。通过使用指向javaw.exe的-vm参数来执行此操作:

  eclipse -vm C:\jdk\jre \bin\javaw.exe 


Running Eclipse 3.5.1, JDK 1.6.0_17 on WinXP SP3 32Bit with 3.5 gigs of RAM.
I'm aware of the known Eclipse best practices, still trying to figure out eclipse.ini.

This will launch: -Xmx588m and this won't: -Xmx589m.
Same with -XX:MaxPermSize. Anything above -XX:MaxPermSize=140m won't launch.
The screen of death is simlar to this (taken from here).

Any ideas on why might this be happening?

解决方案

See this eclipse bug.

The general problem is the jvm requires a contiguous block of memory for this. On windows, the process will be getting 2 Gigs, other libraries that get loaded are placed in different areas of the memory space. If a library happens to get placed in the middle, in basically cuts in half the size you can use.

The Eclipse launcher will be loading some system dlls to do graphics, and in particular, user32.dll can result in 3rd party libraries getting loaded depending what is installed on your machine (seen here).

To achieve higher memory limits, you can force the jvm to be forked into a separate process from the eclipse launcher. The jvm process won't be loading these extra libraries until after the vm has initialized its memory. Do this by using a -vm argument pointing to a javaw.exe:

eclipse -vm C:\jdk\jre\bin\javaw.exe

这篇关于为什么Eclipse会崩溃Xmx,XX:MaxPermSize高于某些值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆