< prev index next >

test/gc/stress/TestStressG1Humongous.java

Print this page

        

@@ -90,12 +90,12 @@
      * @return expected amount of humongous objects
      */
     private int getExpectedAmountOfObjects() {
         long maxMem = Runtime.getRuntime().maxMemory();
         int expectedHObjects = (int) (maxMem / HUMONGOUS_SIZE);
-        // Will allocate 1 region less to give some free space for VM.
-        int checkedAmountOfHObjects = checkHeapCapacity(expectedHObjects) - 1;
+        // Will allocate 2 region less to give some free space for VM.
+        int checkedAmountOfHObjects = checkHeapCapacity(expectedHObjects) - 2;
         return checkedAmountOfHObjects;
     }
 
     /**
      * Starts several threads to allocate the requested amount of humongous objects.
< prev index next >