How can I give eclipse more memory than 512M?
Solution 1:
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).
Open eclipse.ini
in the Eclipse installation directory.
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: 32bit version of juno seems to not accept more than Xmx1024m where the 64 bit version accept 2048.
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.
Solution 2:
Here is how i increased the memory allocation of eclipse Juno:
I have a total of 4GB on my system and when im working on eclipse, i dont run any other heavy softwares along side it. So I allocated 2Gb.
The thing i noticed is that the difference between min and max values should be of 512. The next value should be let say 2048 min + 512 = 2560max
Here is the heap value inside eclipse after setting -Xms2048m -Xmx2560m
: