Mercurial > hg > truffle
diff src/share/vm/gc_implementation/g1/heapRegion.hpp @ 993:54b3b351d6f9
Merge
author | jrose |
---|---|
date | Wed, 23 Sep 2009 23:56:15 -0700 |
parents | 2c79770d1f6e |
children | ff2402f6a50b |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/heapRegion.hpp Fri Sep 18 09:57:47 2009 -0700 +++ b/src/share/vm/gc_implementation/g1/heapRegion.hpp Wed Sep 23 23:56:15 2009 -0700 @@ -297,15 +297,24 @@ HeapRegion(G1BlockOffsetSharedArray* sharedOffsetArray, MemRegion mr, bool is_zeroed); - enum SomePublicConstants { - // HeapRegions are GrainBytes-aligned - // and have sizes that are multiples of GrainBytes. - LogOfHRGrainBytes = 20, - LogOfHRGrainWords = LogOfHRGrainBytes - LogHeapWordSize, - GrainBytes = 1 << LogOfHRGrainBytes, - GrainWords = 1 <<LogOfHRGrainWords, - MaxAge = 2, NoOfAges = MaxAge+1 - }; + static int LogOfHRGrainBytes; + static int LogOfHRGrainWords; + // The normal type of these should be size_t. However, they used to + // be members of an enum before and they are assumed by the + // compilers to be ints. To avoid going and fixing all their uses, + // I'm declaring them as ints. I'm not anticipating heap region + // sizes to reach anywhere near 2g, so using an int here is safe. + static int GrainBytes; + static int GrainWords; + static int CardsPerRegion; + + // It sets up the heap region size (GrainBytes / GrainWords), as + // well as other related fields that are based on the heap region + // size (LogOfHRGrainBytes / LogOfHRGrainWords / + // CardsPerRegion). All those fields are considered constant + // throughout the JVM's execution, therefore they should only be set + // up once during initialization time. + static void setup_heap_region_size(uintx min_heap_size); enum ClaimValues { InitialClaimValue = 0,