< prev index next >
test/gc/g1/TestShrinkDefragmentedHeap.java
Print this page
rev 8624 : 8129590: TestShrinkDefragmentedHeap.java runs out of memory
Reviewed-by:
@@ -49,16 +49,18 @@
// together with humongous regions. So if there are a lot of old regions in the lower part of the heap,
// the humongous regions will be allocated in the upper part of the heap anyway.
// To avoid this the Eden needs to be big enough to fit all the small objects.
private static final int INITIAL_HEAP_SIZE = 200 * 1024 * 1024;
private static final int MINIMAL_YOUNG_SIZE = 190 * 1024 * 1024;
+ private static final int MAXIMUM_HEAP_SIZE = 256 * 1024 * 1024;
private static final int REGION_SIZE = 1 * 1024 * 1024;
public static void main(String[] args) throws Exception, Throwable {
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-XX:InitialHeapSize=" + INITIAL_HEAP_SIZE,
"-Xmn" + MINIMAL_YOUNG_SIZE,
+ "-Xmx" + MAXIMUM_HEAP_SIZE,
"-XX:MinHeapFreeRatio=10",
"-XX:MaxHeapFreeRatio=11",
"-XX:+UseG1GC",
"-XX:G1HeapRegionSize=" + REGION_SIZE,
"-XX:-ExplicitGCInvokesConcurrent",
< prev index next >