Reputation: 7927
I am developing android apps using eclipse running on windows XP. Recently eclipse has been complaining about running out of heap space for itself. It brings up a window like this:
which appears without even running my app. I.e. I just start eclipse, wait a minute and this window pops up. On another forum I saw a suggestion of starting up eclipse with eclipse.exe -vmargs -Xmx512M
, but the problem still appeared.
My eclipse.ini looks like this:
-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.2.R36x_v20101222
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx384m
EDIT: I just changed this part:
--launcher.XXMaxPermSize
256M
to say:
--launcher.XXMaxPermSize
512M
But the crash still happened.
Upvotes: 1
Views: 778
Reputation: 116
Some times setting -Xms and -Xmx values might not work if there isn't enough memory available in the system. I generally use -xms 128m - (The initially memory which is allocated when eclipse is launched) and -xmx 512m - (Maximum allowed memory for the eclipse) which increase gradually as the heap size increases. This is sufficient for normal usage but you can increase the maximum value to almost 1380m( on a 4gb machine more than this might not work some times). To monitor how the heap is growing in eclipse you can use Window->Preferences-General->Show Heap Status.
Upvotes: 0
Reputation: 16142
The option you want to increase is not the permanent size, but the heap size - set the -Xmx384m option to f.e. -Xmx712m .
Upvotes: 3
Reputation: 81
Hello try to set these value on eclipse config --launcher.XXMaxPermSize 1024m --launcher.defaultAction openFile -vmargs -Xms512m -Xmx1024m
Upvotes: 0