comparison src/share/vm/gc_implementation/g1/heapRegion.hpp @ 942:2c79770d1f6e

6819085: G1: use larger and/or user settable region size Summary: Instead of the region size being hard-coded, allow the user to set it. Reviewed-by: jmasa, johnc, apetrusenko
author tonyp
date Thu, 30 Jul 2009 16:22:58 -0400
parents 830ca2573896
children ff2402f6a50b
comparison
equal deleted inserted replaced
941:8b46c4d82093 942:2c79770d1f6e
295 public: 295 public:
296 // If "is_zeroed" is "true", the region "mr" can be assumed to contain zeros. 296 // If "is_zeroed" is "true", the region "mr" can be assumed to contain zeros.
297 HeapRegion(G1BlockOffsetSharedArray* sharedOffsetArray, 297 HeapRegion(G1BlockOffsetSharedArray* sharedOffsetArray,
298 MemRegion mr, bool is_zeroed); 298 MemRegion mr, bool is_zeroed);
299 299
300 enum SomePublicConstants { 300 static int LogOfHRGrainBytes;
301 // HeapRegions are GrainBytes-aligned 301 static int LogOfHRGrainWords;
302 // and have sizes that are multiples of GrainBytes. 302 // The normal type of these should be size_t. However, they used to
303 LogOfHRGrainBytes = 20, 303 // be members of an enum before and they are assumed by the
304 LogOfHRGrainWords = LogOfHRGrainBytes - LogHeapWordSize, 304 // compilers to be ints. To avoid going and fixing all their uses,
305 GrainBytes = 1 << LogOfHRGrainBytes, 305 // I'm declaring them as ints. I'm not anticipating heap region
306 GrainWords = 1 <<LogOfHRGrainWords, 306 // sizes to reach anywhere near 2g, so using an int here is safe.
307 MaxAge = 2, NoOfAges = MaxAge+1 307 static int GrainBytes;
308 }; 308 static int GrainWords;
309 static int CardsPerRegion;
310
311 // It sets up the heap region size (GrainBytes / GrainWords), as
312 // well as other related fields that are based on the heap region
313 // size (LogOfHRGrainBytes / LogOfHRGrainWords /
314 // CardsPerRegion). All those fields are considered constant
315 // throughout the JVM's execution, therefore they should only be set
316 // up once during initialization time.
317 static void setup_heap_region_size(uintx min_heap_size);
309 318
310 enum ClaimValues { 319 enum ClaimValues {
311 InitialClaimValue = 0, 320 InitialClaimValue = 0,
312 FinalCountClaimValue = 1, 321 FinalCountClaimValue = 1,
313 NoteEndClaimValue = 2, 322 NoteEndClaimValue = 2,