File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
test/hotspot/jtreg/gc/stress Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ public static void main(String[] args) throws Exception {
5757 Collections .addAll (options ,
5858 "-Xlog:gc,gc+heap+region=debug" ,
5959 "-XX:+UseG1GC" ,
60+ "-Xmx1g" ,
6061 StressUncommit .class .getName ()
6162 );
6263 OutputAnalyzer output = ProcessTools .executeLimitedTestJava (options );
@@ -79,9 +80,9 @@ public static void main(String args[]) throws InterruptedException {
7980 // Leave 20% head room to try to avoid Full GCs.
8081 long allocationSize = (long ) (Runtime .getRuntime ().maxMemory () * 0.8 );
8182
82- // Figure out suitable number of workers (~1 per gig ).
83- int gigsOfAllocation = (int ) Math .ceil ((double ) allocationSize / G );
84- int numWorkers = Math .min (gigsOfAllocation , Runtime .getRuntime ().availableProcessors ());
83+ // Figure out suitable number of workers (~1 per 100M ).
84+ int allocationChunks = (int ) Math .ceil ((double ) allocationSize / ( 100 * M ) );
85+ int numWorkers = Math .min (allocationChunks , Runtime .getRuntime ().availableProcessors ());
8586 long workerAllocation = allocationSize / numWorkers ;
8687
8788 log ("Using " + numWorkers + " workers, each allocating: ~" + (workerAllocation / M ) + "M" );
You can’t perform that action at this time.
0 commit comments