Increase JVM max heap size for Eclipse

后端 未结 4 1543
无人共我
无人共我 2020-11-28 08:30

I am trying to increase the max heap size for my Eclipse. I have tried specifying in eclipse.ini or through the command line, but are not working.

My m

相关标签:
4条回答
  • 2020-11-28 08:43

    You can use this configuration:

    -startup
    plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
    --launcher.library
    plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20120913-144807
    -showsplash
    org.eclipse.platform
    --launcher.XXMaxPermSize
    256m
    --launcher.defaultAction
    openFile
    -vmargs
    -Xms512m
    -Xmx1024m
    -XX:+UseParallelGC
    -XX:PermSize=256M
    -XX:MaxPermSize=512M
    
    0 讨论(0)
  • 2020-11-28 08:44

    It is possible to increase heap size allocated by the Java Virtual Machine (JVM) by using command line options.

    -Xms<size>        set initial Java heap size
    -Xmx<size>        set maximum Java heap size
    -Xss<size>        set java thread stack size
    

    If you are using the tomcat server, you can change the heap size by going to Eclipse/Run/Run Configuration and select Apache Tomcat/your_server_name/Arguments and under VM arguments section use the following:

    -XX:MaxPermSize=256m
    -Xms256m -Xmx512M
    

    If you are not using any server, you can type the following on the command line before you run your code:

    java -Xms64m -Xmx256m HelloWorld
    

    More information on increasing the heap size can be found here

    0 讨论(0)
  • 2020-11-28 08:48

    --launcher.XXMaxPermSize

    256m

    Try to bump that value up!

    0 讨论(0)
  • 2020-11-28 08:53

    Try to modify the eclipse.ini so that both Xms and Xmx are of the same value:

    -Xms6000m
    -Xmx6000m
    

    This should force the Eclipse's VM to allocate 6GB of heap right from the beginning.

    But be careful about either using the eclipse.ini or the command-line ./eclipse/eclipse -vmargs .... It should work in both cases but pick one and try to stick with it.

    0 讨论(0)
提交回复
热议问题