< prev index next >

test/gc/shenandoah/oom/TestAllocLargerThanHeap.java

Print this page
rev 10697 : [backport] Prepare tests for making UseShenandoahGC experimental
rev 10772 : [backport] Update copyrights
rev 10782 : [backport] Shenandoah should @require Shenandoah, @key gc, and have good @test
rev 10786 : [backport] Reformat Shenandoah tests

*** 1,7 **** /* ! * Copyright (c) 2018 Red Hat, Inc. and/or its affiliates. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * --- 1,7 ---- /* ! * Copyright (c) 2018, Red Hat, Inc. All rights reserved. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. *
*** 22,40 **** */ /** * @test TestAllocLargerThanHeap * @summary Test that allocation of the object larger than heap fails predictably * @library /testlibrary * @run main TestAllocLargerThanHeap */ import com.oracle.java.testlibrary.*; public class TestAllocLargerThanHeap { ! static final int SIZE = 16*1024*1024; static volatile Object sink; public static void work() throws Exception { sink = new Object[SIZE]; --- 22,42 ---- */ /** * @test TestAllocLargerThanHeap * @summary Test that allocation of the object larger than heap fails predictably + * @key gc * @library /testlibrary + * * @run main TestAllocLargerThanHeap */ import com.oracle.java.testlibrary.*; public class TestAllocLargerThanHeap { ! static final int SIZE = 16 * 1024 * 1024; static volatile Object sink; public static void work() throws Exception { sink = new Object[SIZE];
*** 47,56 **** --- 49,59 ---- } { ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( "-Xmx16m", + "-XX:+UnlockExperimentalVMOptions", "-XX:+UseShenandoahGC", TestAllocLargerThanHeap.class.getName(), "test"); OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
*** 59,68 **** --- 62,72 ---- } { ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( "-Xmx1g", + "-XX:+UnlockExperimentalVMOptions", "-XX:+UseShenandoahGC", TestAllocLargerThanHeap.class.getName(), "test"); OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
< prev index next >