How to increase memory in Eclipse

How to increase Eclipse Memory for Eclipse Plugin Development

At the time of Eclipse Plugin or RCP development, you may have seen the typical error like “Permgen“, “Out of Memory Error“, which creates an alarming problem for our development. But do not be panic by this error, as it happens in many cases. I can not tell you the exact root cause of problem. There may be lot of reasons for this which is beyond our scope for this discussion. However there is small quick setting fix which will help you to get rid of this problem.

If you are working in a development environment for Eclipse Plugin, make the memory setting in Eclipse “Run Configuration” dialog. Use it like this

-Dosgi.requiredJavaVersion=1.5 -Xms40m -Xmx512m

-XX:MaxPermSize=1024m”.

The actual memory setting line is “-XX:MaxPermSize=1024m”.

For more details, see below the image.

Eclipse Memory Setting in Run Dialog

 

 

 

 

 

 

 

 

If you are working on Eclipse RCP Product development, you modify the memory setting of “eclipse.ini” which is available inside your eclipse directory. In case of RCP product, you have to change accordingly. I provide below the complete “eclipse.ini”.

-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
–launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502
-product
org.eclipse.epp.package.rcp.product
–launcher.defaultAction
openFile
–launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
–launcher.XXMaxPermSize
256m
–launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms256m
-Xmx512m
-XX:PermSize=512M
-XX:MaxPermSize=1024m

Download the eclipse.ini file from this link.

I hope this small post will help you.

Debadatta Mishra(PIKU)
Senior Software Engineer
Bangalore,
India


Advertisements

1 Comment

  1. October 23, 2011 at 7:11 pm

    […] How to increase memory in Eclipse […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s