diff --git a/hotspot/test/runtime/memory/ReadFromNoaccessArea.java b/hotspot/test/runtime/memory/ReadFromNoaccessArea.java index 1078dd2e4ea..484240287ce 100644 --- a/hotspot/test/runtime/memory/ReadFromNoaccessArea.java +++ b/hotspot/test/runtime/memory/ReadFromNoaccessArea.java @@ -47,6 +47,7 @@ public class ReadFromNoaccessArea { "-XX:+WhiteBoxAPI", "-XX:+UseCompressedOops", "-XX:HeapBaseMinAddress=33G", + "-Xmx32m", DummyClassWithMainTryingToReadFromNoaccessArea.class.getName()); OutputAnalyzer output = new OutputAnalyzer(pb.start()); diff --git a/hotspot/test/runtime/memory/ReserveMemory.java b/hotspot/test/runtime/memory/ReserveMemory.java index 9e37d52ccda..3a65ca605c2 100644 --- a/hotspot/test/runtime/memory/ReserveMemory.java +++ b/hotspot/test/runtime/memory/ReserveMemory.java @@ -57,6 +57,7 @@ public class ReserveMemory { "-XX:+UnlockDiagnosticVMOptions", "-XX:+WhiteBoxAPI", "-XX:-TransmitErrorReport", + "-Xmx32m", "ReserveMemory", "test");