src/share/vm/gc_implementation/g1/collectionSetChooser.cpp

changeset 3357
441e946dc1af
parent 3294
bca17e38de00
child 3539
a9647476d1a4
equal deleted inserted replaced
3356:67fdcb391461 3357:441e946dc1af
262 // This is defensive code. As the assertion above says, the number 262 // This is defensive code. As the assertion above says, the number
263 // of active threads should be > 0, but in case there is some path 263 // of active threads should be > 0, but in case there is some path
264 // or some improperly initialized variable with leads to no 264 // or some improperly initialized variable with leads to no
265 // active threads, protect against that in a product build. 265 // active threads, protect against that in a product build.
266 n_threads = MAX2(G1CollectedHeap::heap()->workers()->active_workers(), 266 n_threads = MAX2(G1CollectedHeap::heap()->workers()->active_workers(),
267 1); 267 1U);
268 } 268 }
269 size_t max_waste = n_threads * chunkSize; 269 size_t max_waste = n_threads * chunkSize;
270 // it should be aligned with respect to chunkSize 270 // it should be aligned with respect to chunkSize
271 size_t aligned_n_regions = 271 size_t aligned_n_regions =
272 (n_regions + (chunkSize - 1)) / chunkSize * chunkSize; 272 (n_regions + (chunkSize - 1)) / chunkSize * chunkSize;

mercurial