< prev index next >

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

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

@@ -34,10 +34,13 @@
  * @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,11 +78,11 @@
     }
 
     public static void fill() {
         boolean _overflow = false;
         Runtime rt = java.lang.Runtime.getRuntime();
-        java.util.Random stream = new java.util.Random();
+        Random stream = Utils.getRandomInstance();
         Space next = null;
         try {
             for (long available = rt.freeMemory();
                  available > freeSpaceLimit;
                  available = rt.freeMemory()) {
< prev index next >