8071584: [TESTBUG] runtime/Unsafe/AllocateMemory.java crashed on OOM during compilation.
authorctornqvi
Thu, 29 Jan 2015 14:50:43 -0800
changeset 28818 ba7d959f65e7
parent 28817 09a44329d68d
child 28819 70ac575cccce
child 28822 fa57694ade05
8071584: [TESTBUG] runtime/Unsafe/AllocateMemory.java crashed on OOM during compilation. Reviewed-by: dholmes, gtriantafill, jprovino
hotspot/test/runtime/Unsafe/AllocateMemory.java
--- a/hotspot/test/runtime/Unsafe/AllocateMemory.java	Thu Jan 29 14:37:14 2015 -0500
+++ b/hotspot/test/runtime/Unsafe/AllocateMemory.java	Thu Jan 29 14:50:43 2015 -0800
@@ -25,7 +25,7 @@
  * @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.*;
@@ -56,7 +56,7 @@
         // 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;