Product Development in Brisbane

Memory Settings for Eclipse on OSX

For the regular readers of my blog, you may be wondering why I am stepping over to the dark side, and using Eclipse. Not to fear – it is just for an Eclipse plug-in. Using the right tool for the right job is important to always do.

When recently using the SAP Memory Analyzer tool to look at a large (1GByte) hpprof output file, I was running out of Heap space, so was lookin for where to set the -Xmx and -Xms settings on Eclipes. It was somewhat harder to find than desired, and the internet didn’t tell my as quickly as I wanted, so here’s the answer (while the video at http://www.brooksandrus.com/bog_assets/screencasts/eclipsejvmheap/ was cool, a simple text blog entry would have made me happy).

The eclipse.ini file in Eclipse.app/Contents/MacOS is the file that needs to be edited. (not the one that for me was close in location /Applications/eclipse/configuration/ eclipse.ini was bad, /Applications/eclipse/Eclipse.app/Contents/MacOS/ eclipse.ini was good).

After finding the right eclipse.ini, setting the memory is straightfoward. Simpley update the -Xmx and -Xms settings (see: The Sun Tuning java guide for what these do if you don’t know).

Leave a Reply