comparison src/share/vm/gc_implementation/g1/collectionSetChooser.cpp @ 4728:441e946dc1af

7121618: Change type of number of GC workers to unsigned int. Summary: Change variables representing the number of GC workers to uint from int and size_t. Change the parameter in work(int i) to work(uint worker_id). Reviewed-by: brutisso, tonyp
author jmasa
date Wed, 14 Dec 2011 13:34:57 -0800
parents bca17e38de00
children a9647476d1a4
comparison
equal deleted inserted replaced
4727:67fdcb391461 4728: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;