Eclipse release heap back to system

前端 未结 3 1210
轻奢々
轻奢々 2020-12-18 13:09

I\'m using Eclipse 3.6 with latest Sun Java 6 on Linux (64 bit) with a larger number of large projects. In some special circumstances (SVN updates for example) Eclipse needs

3条回答
  •  萌比男神i
    2020-12-18 13:44

    Found a solution. I switched Java to use the G1 garbage collector and now the HeapFreeRatio parameters works as intended. So I use these options in eclipse.ini:

    -XX:+UnlockExperimentalVMOptions
    -XX:+UseG1GC
    -XX:MinHeapFreeRatio=5
    -XX:MaxHeapFreeRatio=25
    

    Now when Eclipse eats up more than 1 GB of RAM for a complicated operation and switched back to 300 MB after Garbage Collection the memory is actually released back to the operating system.

提交回复
热议问题