Help changing OSX Eclipse Java Heap allocation
Solution 1
In your comments you clarified that you're trying to increase the memory for an application you're running in Eclipse. What you've been trying increases the memory for Eclipse itself. To increase the memory for an application you're running in Eclipse to 1536m follow these steps:
- Go to Run > Run Configurations...
- Select your Java Application
- Go to the Arguments tab
- Add
-Xmx1536m
to the your VM arguments
Solution 2
It is possible to increase heap size allocated by the JVM in eclipse directly In eclipse IDE goto
Run---->Run Configurations---->
Enter
-Xmx1g
(It is used to set the max size like Xmx256m or Xmx1g...... m-->mb g--->gb)
Comments
-
Ricardo Sanchez almost 2 years
I need to increase the heap allocation but I think I am missing a step, I follow this instructions http://wiki.eclipse.org/Eclipse.ini but the ini file is different from mine, this is what I get
-startup ../../../plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar --launcher.library ../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx_1.1.2.R36x_v20101019_1345 -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m --launcher.defaultAction openFile -product org.eclipse.epp.package.java.product --launcher.defaultAction openFile -vmargs -Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts -Dosgi.requiredJavaVersion=1.5 -Xms40m -Xmx1536m -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts -XX:MaxPermSize=256m
I change line -Xmx1536m but still get the out of memory problem, any ideas what else I need to setup? I have the latest 64bit Eclipse IDE and running on OSX 10.6.7
Thanks