changeset 8668:3c1e5b2a99d3

8129590: TestShrinkDefragmentedHeap.java runs out of memory Reviewed-by: jwilhelm, tschatzl
author sjohanss
date Wed, 01 Jul 2015 16:38:14 +0200
parents 90e332204e4d
children f6f5bd99f5a9 2e2af46ffba3
files test/gc/g1/TestShrinkDefragmentedHeap.java
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/test/gc/g1/TestShrinkDefragmentedHeap.java	Wed Jul 01 10:26:59 2015 +0000
+++ b/test/gc/g1/TestShrinkDefragmentedHeap.java	Wed Jul 01 16:38:14 2015 +0200
@@ -23,7 +23,7 @@
 
 /**
  * @test TestShrinkDefragmentedHeap
- * @bug 8038423
+ * @bug 8038423 8129590
  * @summary Verify that heap shrinks after GC in the presence of fragmentation due to humongous objects
  *     1. allocate small objects mixed with humongous ones
  *        "ssssHssssHssssHssssHssssHssssHssssH"
@@ -51,12 +51,14 @@
     // 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",