Mercurial > hg > graal-compiler
comparison src/share/vm/gc_implementation/g1/heapRegion.hpp @ 3986:65a8ff39a6da
7095194: G1: HeapRegion::GrainBytes, GrainWords, and CardsPerRegion should be size_t
Summary: Declare GrainBytes, GrainWords, and CardsPerRegion as size_t.
Reviewed-by: jcoomes, tonyp, jmasa
author | johnc |
---|---|
date | Wed, 05 Oct 2011 08:44:10 -0700 |
parents | 8229bd737950 |
children | 5e5d4821bf07 |
comparison
equal
deleted
inserted
replaced
3985:c63b928b212b | 3986:65a8ff39a6da |
---|---|
344 // If "is_zeroed" is "true", the region "mr" can be assumed to contain zeros. | 344 // If "is_zeroed" is "true", the region "mr" can be assumed to contain zeros. |
345 HeapRegion(size_t hrs_index, | 345 HeapRegion(size_t hrs_index, |
346 G1BlockOffsetSharedArray* sharedOffsetArray, | 346 G1BlockOffsetSharedArray* sharedOffsetArray, |
347 MemRegion mr, bool is_zeroed); | 347 MemRegion mr, bool is_zeroed); |
348 | 348 |
349 static int LogOfHRGrainBytes; | 349 static int LogOfHRGrainBytes; |
350 static int LogOfHRGrainWords; | 350 static int LogOfHRGrainWords; |
351 // The normal type of these should be size_t. However, they used to | 351 |
352 // be members of an enum before and they are assumed by the | 352 static size_t GrainBytes; |
353 // compilers to be ints. To avoid going and fixing all their uses, | 353 static size_t GrainWords; |
354 // I'm declaring them as ints. I'm not anticipating heap region | 354 static size_t CardsPerRegion; |
355 // sizes to reach anywhere near 2g, so using an int here is safe. | |
356 static int GrainBytes; | |
357 static int GrainWords; | |
358 static int CardsPerRegion; | |
359 | 355 |
360 static size_t align_up_to_region_byte_size(size_t sz) { | 356 static size_t align_up_to_region_byte_size(size_t sz) { |
361 return (sz + (size_t) GrainBytes - 1) & | 357 return (sz + (size_t) GrainBytes - 1) & |
362 ~((1 << (size_t) LogOfHRGrainBytes) - 1); | 358 ~((1 << (size_t) LogOfHRGrainBytes) - 1); |
363 } | 359 } |