< prev index next >

test/runtime/Unsafe/AllocateMemory.java

Print this page
rev 7710 : [mq]: allocatemem

@@ -23,11 +23,11 @@
 
 /*
  * @test
  * @summary Verifies behaviour of Unsafe.allocateMemory
  * @library /testlibrary
- * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:MallocMaxTestWords=20m AllocateMemory
+ * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:MallocMaxTestWords=100m AllocateMemory
  */
 
 import com.oracle.java.testlibrary.*;
 import sun.misc.Unsafe;
 import static com.oracle.java.testlibrary.Asserts.*;

@@ -54,11 +54,11 @@
         }
 
         // allocateMemory() should throw an OutOfMemoryError when the underlying malloc fails,
         // we test this by limiting the malloc using -XX:MallocMaxTestWords
         try {
-            address = unsafe.allocateMemory(20 * 1024 * 1024 * 8);
+            address = unsafe.allocateMemory(100 * 1024 * 1024 * 8);
         } catch (OutOfMemoryError e) {
             // Expected
             return;
         }
         throw new RuntimeException("Did not get expected OutOfMemoryError");
< prev index next >