简体   繁体   English

超出了Eclipse GC开销限制

[英]Eclipse GC overhead limit exceeded

I saw there are more topics about this problem, but I don't found any solution for my case. 我看到有更多有关此问题的主题,但是我的案例没有找到任何解决方案。

I tried : 我试过了 :

-> Clean Project / Restart Eclipse (and Mac too)
-> Change XMS size in eclipse.ini
-> Delete JAR and add again

I saw this "crash" doesn't appear if I uncheck "android privates libraries" in my project's properties..... Why ? 如果我在项目属性中取消选中“ android privates library”,我不会看到此“崩溃”消息。 What am I supposed to do ? 我应该做些什么 ?

If you have changed the xms, that does not help with GC overhead limits, as it sets up the starting heap size, not the heap size. 如果更改了xms,则这对GC开销限制没有帮助,因为它会设置起始堆大小,而不是堆大小。

As a summary, the following common options are used to manage the JVMs memory usage: 概括来说,以下常用选项用于管理JVM的内存使用情况:

  • -Xms1G sets the starting heap size, while -Xmx1G sets the maximum heap size. -Xms1G设置起始堆大小,而-Xmx1G设置最大堆大小。
  • -XX:MaxPermSize=320M sets the size of area where the class files are stored. -XX:MaxPermSize = 320M设置存储类文件的区域的大小。 Only used until Java 7, not required in Java 8 (and possibly in some JVM implementations in general). 仅在Java 7之前使用,Java 8(可能在某些JVM实现中通常不需要)不使用。 In most cases, its default value is correct; 在大多数情况下,其默认值为正确; if not, a different error message is shown that the PermGen space was exhausted. 如果不是,则显示另一个错误消息,表明PermGen空间已用尽。

Related your original issue, I'd look at the maximum heap size setting (you can look at the settings your Eclipse started in Help/Installation details..., and select the configuration page; see screenshot below). 关于您的原始问题,我将查看最大堆大小设置(您可以在“帮助/安装详细信息...”中查看Eclipse启动的设置,然后选择配置页面;请参见下面的屏幕截图)。 If that is in the 512M-1G ballpark, I'd try to increase it, if it's over 2GB, there is something that leaks memory excessively. 如果那是在512M-1G球场中,那么我会尝试增加它,如果它超过2GB,则可能会导致内存泄漏过多。

记忆体设定

Furthermore, as you are using Mac, you should look at the Info.plist file inside of your installation, as it might have additional related settings as well. 此外,在使用Mac时,您应该查看安装中的Info.plist文件,因为它可能还具有其他相关设置。

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

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