views:

340

answers:

5

I have following setup, but when I put 1024 and replace all 512 with 1024, then eclipse won't start at all. How can I have more than 512M memory for my eclipse JVM?

-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-product
com.springsource.sts.ide
--launcher.XXMaxPermSize
512M
-vm
C:\Program Files (x86)\Java\jdk1.6.0_18\bin\javaw 
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms512m
-Xmx512m
-XX:MaxPermSize=512m
A: 

What happens if you leave -Xms512m the same but change all the others?:

-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-product
com.springsource.sts.ide
--launcher.XXMaxPermSize
1024M
-vm
C:\Program Files (x86)\Java\jdk1.6.0_18\bin\javaw 
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms512m
-Xmx1024m
-XX:MaxPermSize=1024m
AaronLS
It won't start, but when you I did what Kaleb Pederson suggested, it started, but you can't get more than 1024M memory...
newbie
A: 

you can have copy this to your eclipse.ini file to have 1024M

-clean -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m -vmargs -Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=256m

GK
+1  A: 

I've had a lot of problems trying to get Eclipse to accept as much memory as I'd like it to be able to use (between 2 and 4 gigs for example).

You should be able to change the memory sizes after -vmargs up to 1024 without a problem up to some maximum value that's dependent on your system. Here's that section on my Linux box:

-vmargs
-Dosgi.requiredJavaVersion=1.5
-XX:MaxPermSize=512m
-Xms512m
-Xmx1024m

And here's that section on my Windows box:

-vmargs
-Xms256m
-Xmx1024m

But, I've failed at setting it higher than 1024 megs. If anybody knows how to make that work, I'd love to know.

EDIT: Nick's post contains some great links that explain two different things:

  • The problem is largely dependent on your system and the amount of contiguous free memory available, and
  • By using javaw.exe (on Windows), you may be able to get a larger allocated block of memory.

I have 8 gigs of Ram and can't set -Xmx to more than 1024 megs of ram, even when a minimal amount of programs are loaded and both windows/linux report between 4 and 5 gigs of free ram.

Kaleb Pederson
A: 

I don't think you need to change the MaxPermSize to 1024m. This works for me:

-startup
plugins/org.eclipse.equinox.launcher_1.0.200.v20090520.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-product
org.eclipse.epp.package.jee.product
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms256m
-Xmx1024m
-XX:PermSize=64m
-XX:MaxPermSize=128m
elduff
um ... could we all get some comments along with the downvotes, please? My answer may not be correct, but it'd help me to know why.
elduff
A: 

Care and feeding of Eclipse's memory hunger is a pain...

More or less, keep trying smaller amounts til it works, that's your max.

Nick Veys
@Nick - sad, but informative. Thanks for the links.
Kaleb Pederson