title: Eclipse release heap back to system
body: <p>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 up to 1 GB heap. But most of the time it only needs 350 MB. When I enable the heap status panel then I see this most of the time:</p>
  
  <p>350M of 878M</p>
  
  <p>I start Eclipse with these settings: -Xms128m -Xmx1024m</p>
  
  <p>So most of the time lots of MB are just wasted and are just used rarely when memory usage peaks for a short time. I don't like that at all and I want Eclipse to release the memory back to the system, so I can use it for other programs.</p>
  
  <p>When Eclipse needs more memory while there is not enough free RAM than Linux can swap out other running programs, I can live with that. I heard there is a -XX:MaxHeapFreeRatio option. But I never figured out what values I have to use so it works. No value I tried ever made a difference.</p>
  
  <p>So how can I tell Eclipse (Or Java) to release unused heap?</p>