< prev index next >
test/hotspot/jtreg/vmTestbase/gc/memory/FillingStation/FillingStation.java
Print this page
rev 59093 : [mq]: randomness-code_vmTestbase_gc
rev 59094 : imported patch randomness-keyword_vmTestbase_gc
rev 59095 : imported patch 8243430.00
*** 1,7 ****
/*
! * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* 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) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* 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.
*** 21,31 ****
* questions.
*/
/*
* @test
! * @key stress gc
*
* @summary converted from VM Testbase gc/memory/FillingStation.
* VM Testbase keywords: [gc, stress, nonconcurrent]
*
* @library /vmTestbase
--- 21,31 ----
* questions.
*/
/*
* @test
! * @key stress gc randomness
*
* @summary converted from VM Testbase gc/memory/FillingStation.
* VM Testbase keywords: [gc, stress, nonconcurrent]
*
* @library /vmTestbase
*** 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 >