< prev index next >

test/hotspot/jtreg/vmTestbase/gc/memory/FillingStation/FillingStation.java

Print this page
rev 59093 : [mq]: randomness-code_vmTestbase_gc

*** 34,43 **** --- 34,46 ---- * @run main/othervm gc.memory.FillingStation.FillingStation */ package gc.memory.FillingStation; + import jdk.test.lib.Utils; + import java.util.Random; + public class FillingStation { public static final long minObjectSize = 4; public static final long freeSpaceLimit = 64; public static final long maxObjectSize = 32*1024;
*** 75,85 **** } public static void fill() { boolean _overflow = false; Runtime rt = java.lang.Runtime.getRuntime(); ! java.util.Random stream = new java.util.Random(); Space next = null; try { for (long available = rt.freeMemory(); available > freeSpaceLimit; available = rt.freeMemory()) { --- 78,88 ---- } public static void fill() { boolean _overflow = false; Runtime rt = java.lang.Runtime.getRuntime(); ! Random stream = Utils.getRandomInstance(); Space next = null; try { for (long available = rt.freeMemory(); available > freeSpaceLimit; available = rt.freeMemory()) {
< prev index next >