RFR: 8129590: TestShrinkDefragmentedHeap.java runs out of memory

Stefan Johansson stefan.johansson at oracle.com
Wed Jul 1 13:51:25 UTC 2015


Please review this test-fix to avoid:


The test specified the initial heap size and the young generation size 
but not the maximum heap size. It needs more memory than the initial 
heap size and in most cases this is not a problem, because the heap can 
be expanded. But on hosts with very little memory it becomes a problem, 
because the maximum heap size gets limited to the same size as the 
initial heap size.

A simple fix for the issue is to set the the maximum heap size to 
something a little larger than the initial heap size to make sure the 
expansion is possible. This might come with other problems if the host 
can't support the needed heap size, but in such cases I think we should 
avoid running this test.

* Verified fix on failing host.
* Reproduced failure locally by setting small Xmx and verified that 
making it larger fixes the issue.


More information about the hotspot-gc-dev mailing list