Eclipse + GWT - >在开发模式下的内存不足 [英] Eclipse + GWT -> Out of memory in development mode

查看:185
本文介绍了Eclipse + GWT - >在开发模式下的内存不足的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我在开发模式下运行我的GWT应用程序,并在浏览器中点击了一段时间,我总是在eclipse中得到一个内存不足的错误。我的电脑有16 GB的Ram,并没有使用超过8GB。

If I run my GWT application in eclipse in development mode and click around in the browser for some time, I always get an "out of memory" error in eclipse. My computer has 16 GB Ram, and there is never used more than 8GB.

我尝试了几个配置参数。我的运行配置中的VM参数包含以下参数:-Xms8192m -Xmx8192m

I tried several config parameters. The VM-arguments in my Run configuration contain these parameters: "-Xms8192m -Xmx8192m"

即使在eclipse.ini中,我测试了几个配置参数,现在看起来像这样:

Even in the eclipse.ini I tested several config parameters and now it looks like this:

--launcher.XXMaxPermSize
8192M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
8192m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms8192m
-Xmx8192m

但是我仍然收到错误。有没有办法防止这种情况?

But I still get the error. Is there any way to prevent this?

推荐答案

如果浏览器应用程序抛出 OutOfMemoryError ,那么您不需要更改Eclipse设置(eclipse.ini),这仅适用于Eclipse本身(更多内存,通常更快的工作台)。

If the browser application is throwing the OutOfMemoryError, then you don't need to change the Eclipse settings (eclipse.ini), that's only for Eclipse itself (more memory, usually faster workbench).

要增加应用程序的内存(从Eclipse启动的任何Java应用程序),请转到运行菜单中的运行/调试配置... ,然后设置参数选项卡中的虚拟机参数

To increase an app's memory (any Java app launched from Eclipse), go to the Run/Debug configurations... in the Run menu and set the VM arguments on the Arguments tab of the app's run config:

-Xms128M -Xmx1024M -XX:MaxPermSize=256M

这篇关于Eclipse + GWT - >在开发模式下的内存不足的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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