< prev index next >
test/hotspot/jtreg/gc/arguments/TestAggressiveHeap.java
Print this page
*** 51,67 ****
private static final String option = "-XX:+AggressiveHeap";
// Option requires at least 256M, else error during option processing.
private static final long minMemory = 256 * 1024 * 1024;
// bool UseParallelGC = true {product} {command line}
private static final String parallelGCPattern =
" *bool +UseParallelGC *= *true +\\{product\\} *\\{command line\\}";
private static void testFlag() throws Exception {
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
! option, "-XX:+PrintFlagsFinal", "-version");
OutputAnalyzer output = new OutputAnalyzer(pb.start());
output.shouldHaveExitValue(0);
--- 51,72 ----
private static final String option = "-XX:+AggressiveHeap";
// Option requires at least 256M, else error during option processing.
private static final long minMemory = 256 * 1024 * 1024;
+ // Setting the heap to half of the physical memory is not suitable for
+ // a test environment with many tests running concurrently, setting to
+ // half of the required size instead.
+ private static final String heapSizeOption = "-Xmx128M";
+
// bool UseParallelGC = true {product} {command line}
private static final String parallelGCPattern =
" *bool +UseParallelGC *= *true +\\{product\\} *\\{command line\\}";
private static void testFlag() throws Exception {
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
! option, heapSizeOption, "-XX:+PrintFlagsFinal", "-version");
OutputAnalyzer output = new OutputAnalyzer(pb.start());
output.shouldHaveExitValue(0);
< prev index next >