3 Replies Latest reply on Nov 17, 2011 4:18 PM by gimbal2

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

      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?