--- old/test/gc/stress/TestStressG1Humongous.java 2016-07-14 19:59:15.032351975 +0300 +++ new/test/gc/stress/TestStressG1Humongous.java 2016-07-14 19:59:14.940350428 +0300 @@ -92,8 +92,8 @@ 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; }