0

I have a problem increasing heap size in Eclipse Luna. While I run my build, it is failing because of reaching the maximum heap size.

I tried all the following options.

Increasing the heap size in eclipse.iniMy eclipse.ini file

Then I tried starting the eclipse from command line using this command. C:\eclipse>eclipse -clean -vmargs -XX:MaxPewrmSize=4G -Xmx4G

And to just change the heap size while running the application, tried to change the heap size Xmx in varaible arguments and program arguments.

All to no avail. What ever change I make, it is not getting reflected in my heap size in eclipse. Please help.

  • Here is one more option: http://stackoverflow.com/a/29024961/3632059 – PVR Jun 14 '16 at 18:58
  • How do you know it's not setting the max heap size? Have you inspected the process with VisualVM to see what it thinks the max heap size is? – David M. Karr Jun 14 '16 at 19:00
  • What exactly do you mean by 'my build'? The eclipse.ini only sets the heap size that Eclipse itself uses. External tools and applications use heap sizes configured elsewhere. – greg-449 Jun 14 '16 at 19:28
  • Good point. If the "build" is using Maven, Gradle, or Ant, they run as a separate process, which you can configure the max heap size for. – David M. Karr Jun 14 '16 at 19:33
  • That is true. I did not think about that. I am inspecting the heap flow by enabling show heap status in preferences. So all the time it is showing head memory inside 512. I'm building using maven, does that mean the heap status which i'm seeing while building is that of the maven in the heap status bar down there? – Gowrisankar Gopalakrishnan Jun 14 '16 at 20:30
  • The heap in Eclipse is the heap in Eclipse. It has nothing to do with the Maven process. Set max heap for Maven with something like the following: http://www.janosgyerik.com/how-to-increase-jvm-heap-size-for-maven/ . – David M. Karr Jun 14 '16 at 22:49

0 Answers0