How can I give eclipse more memory than 512M?

后端 未结 7 896
清酒与你
清酒与你 2020-11-28 02:31

I have following setup, but when I put 1024 and replace all 512 with 1024, then eclipse won\'t start at all. How can I have more than 512M memory for my eclipse JVM?

相关标签:
7条回答
  • 2020-11-28 03:12

    You can copy this to your eclipse.ini file to have 1024M:

    -clean -showsplash
    org.eclipse.platform
    --launcher.XXMaxPermSize
    256m
    -vmargs
    -Xms512m
    -Xmx1024m
    -XX:PermSize=128m
    -XX:MaxPermSize=256m 
    
    0 讨论(0)
  • 2020-11-28 03:13

    I don't think you need to change the MaxPermSize to 1024m. This works for me:

    -startup
    plugins/org.eclipse.equinox.launcher_1.0.200.v20090520.jar
    --launcher.library
    plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
    -product
    org.eclipse.epp.package.jee.product
    --launcher.XXMaxPermSize
    256M
    -showsplash
    org.eclipse.platform
    --launcher.XXMaxPermSize
    256m
    -vmargs
    -Dosgi.requiredJavaVersion=1.5
    -Xms256m
    -Xmx1024m
    -XX:PermSize=64m
    -XX:MaxPermSize=128m
    
    0 讨论(0)
  • 2020-11-28 03:15

    Care and feeding of Eclipse's memory hunger is a pain...

    • http://www.eclipsezone.com/eclipse/forums/t104307.html
    • https://bugs.eclipse.org/bugs/show_bug.cgi?id=188968
    • https://bugs.eclipse.org/bugs/show_bug.cgi?id=238378

    More or less, keep trying smaller amounts til it works, that's your max.

    0 讨论(0)
  • 2020-11-28 03:19

    Here is how i increased the memory allocation of eclipse Juno:

    enter image description here

    I have a total of 4GB on my system and when im working on eclipse, i dont run any other heavy softwares along side it. So I allocated 2Gb.

    The thing i noticed is that the difference between min and max values should be of 512. The next value should be let say 2048 min + 512 = 2560max

    Here is the heap value inside eclipse after setting -Xms2048m -Xmx2560m:

    enter image description here

    0 讨论(0)
  • 2020-11-28 03:29

    While working on an enterprise project in STS (heavily Eclipse based) I was crashing constantly and STS plateaued at around 1GB of RAM usage. I couldn't add new .war files to my local tomcat server and after deleting the tomcat folder to re-add it, found I couldn't re-add it either. Essentially almost anything that required a new popup besides the main menus was causing STS to freeze up.

    I edited the STS.ini (your Eclipse.ini can be configured similarly) to:

    --launcher.XXMaxPermSize 1024M -vmargs -Xms1536m -Xmx2048m -XX:MaxPermSize=1024m

    Rebooted STS immediately and saw it plateau at about 1.5 gigs before finally not crashing

    0 讨论(0)
  • 2020-11-28 03:32

    Configuring this worked for me: -vmargs -Xms1536m -Xmx2048m -XX:MaxPermSize=1024m on Eclipse Java Photon June 2018

    Running Windows 10, 8 GB ram and 64 bit. You can extend -Xmx2048 -XX:MaxpermSize= 1024m to 4096m too, if your computer has good ram.Mine worked well.

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