3 Replies Latest reply: Nov 17, 2011 10:18 AM by gimbal2 RSS

    -XX:MaxHeapFreeRatio=45 doesn't release heap even when more than 45% free

    900655
      I have a java application with the arguments below but the heap is not getting reclaimed even when the total free space is greater than 45% (can see via visual VM). Is there any reason that the JVM wouldnt free that heap space? The same settings work as expected in Java6. Running Java5 runtime and compile time.

      java -jar -Xmx1024m -XX:MinHeapFreeRatio=15 -XX:MaxHeapFreeRatio=45 -XX:+HeapDumpOnOutOfMemoryError <myjarname>

      Why wouldn't the maxheapfreeratio work correctly in this case?