29 //// CompactibleFreeListSpace |
29 //// CompactibleFreeListSpace |
30 ///////////////////////////////////////////////////////////////////////// |
30 ///////////////////////////////////////////////////////////////////////// |
31 |
31 |
32 // highest ranked free list lock rank |
32 // highest ranked free list lock rank |
33 int CompactibleFreeListSpace::_lockRank = Mutex::leaf + 3; |
33 int CompactibleFreeListSpace::_lockRank = Mutex::leaf + 3; |
|
34 |
|
35 // Defaults are 0 so things will break badly if incorrectly initialized. |
|
36 int CompactibleFreeListSpace::IndexSetStart = 0; |
|
37 int CompactibleFreeListSpace::IndexSetStride = 0; |
|
38 |
|
39 size_t MinChunkSize = 0; |
|
40 |
|
41 void CompactibleFreeListSpace::set_cms_values() { |
|
42 // Set CMS global values |
|
43 assert(MinChunkSize == 0, "already set"); |
|
44 #define numQuanta(x,y) ((x+y-1)/y) |
|
45 MinChunkSize = numQuanta(sizeof(FreeChunk), MinObjAlignmentInBytes) * MinObjAlignment; |
|
46 |
|
47 assert(IndexSetStart == 0 && IndexSetStride == 0, "already set"); |
|
48 IndexSetStart = MinObjAlignment; |
|
49 IndexSetStride = MinObjAlignment; |
|
50 } |
34 |
51 |
35 // Constructor |
52 // Constructor |
36 CompactibleFreeListSpace::CompactibleFreeListSpace(BlockOffsetSharedArray* bs, |
53 CompactibleFreeListSpace::CompactibleFreeListSpace(BlockOffsetSharedArray* bs, |
37 MemRegion mr, bool use_adaptive_freelists, |
54 MemRegion mr, bool use_adaptive_freelists, |
38 FreeBlockDictionary::DictionaryChoice dictionaryChoice) : |
55 FreeBlockDictionary::DictionaryChoice dictionaryChoice) : |