< prev index next >

test/gc/g1/TestHumongousShrinkHeap.java

Print this page

        

@@ -56,10 +56,14 @@
                              = (int) ((AVAILABLE_MEMORY / HUMON_SIZE)
             / LISTS_COUNT);
 
 
     public static void main(String[] args) {
+        if (HUMON_COUNT == 0) {
+            System.out.println("Skipped. Heap is too small");
+            return;
+        }
         System.out.format("Running with %s max heap size. "
                 + "Will allocate humongous object of %s size %d times.%n",
                 MemoryUsagePrinter.humanReadableByteCount(AVAILABLE_MEMORY, false),
                 MemoryUsagePrinter.humanReadableByteCount(HUMON_SIZE, false),
                 HUMON_COUNT
< prev index next >