< prev index next >

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

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

*** 35,45 **** */ package gc.memory.LargePagesTest; import java.io.PrintStream; ! import java.util.Random; /* * Allocators purpose is to create pressure on the garbage collector * for a certain amount of time. * Note: this test moved from the "jr", the original name is func.vm.largepages.LargePagesTest --- 35,45 ---- */ package gc.memory.LargePagesTest; import java.io.PrintStream; ! import nsk.share.test.LocalRandom; /* * Allocators purpose is to create pressure on the garbage collector * for a certain amount of time. * Note: this test moved from the "jr", the original name is func.vm.largepages.LargePagesTest
*** 156,183 **** result = true; } } private void allocate() { - - Random r = new Random(); for (int j = 0; j < 1000; j++) { - r = new Random(); int i = 0; switch (myType) { case SMALL_OBJECT_ALLOCATER: i = 5; break; case LARGE_OBJECT_ALLOCATER: i = 1; break; case ANY_OBJECT_ALLOCATER: ! i = r.nextInt(100); break; case ANY_NO_MULTIARRAYS_ALLOCATER: ! i = r.nextInt(100); if ((i >= 2) && (i <= 4)) { i = 5; } break; default: --- 156,180 ---- result = true; } } private void allocate() { for (int j = 0; j < 1000; j++) { int i = 0; switch (myType) { case SMALL_OBJECT_ALLOCATER: i = 5; break; case LARGE_OBJECT_ALLOCATER: i = 1; break; case ANY_OBJECT_ALLOCATER: ! i = LocalRandom.nextInt(100); break; case ANY_NO_MULTIARRAYS_ALLOCATER: ! i = LocalRandom.nextInt(100); if ((i >= 2) && (i <= 4)) { i = 5; } break; default:
< prev index next >