Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp @ 1579:e9ff18c4ace7
Merge
author | jrose |
---|---|
date | Wed, 02 Jun 2010 22:45:42 -0700 |
parents | c18cbe5936b8 2d127394260e |
children | be3f9c242c9d |
comparison
equal
deleted
inserted
replaced
1562:dfe27f03244a | 1579:e9ff18c4ace7 |
---|---|
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) : |
300 return sum; | 317 return sum; |
301 } | 318 } |
302 | 319 |
303 size_t CompactibleFreeListSpace::totalCountInIndexedFreeLists() const { | 320 size_t CompactibleFreeListSpace::totalCountInIndexedFreeLists() const { |
304 size_t count = 0; | 321 size_t count = 0; |
305 for (int i = MinChunkSize; i < IndexSetSize; i++) { | 322 for (int i = (int)MinChunkSize; i < IndexSetSize; i++) { |
306 debug_only( | 323 debug_only( |
307 ssize_t total_list_count = 0; | 324 ssize_t total_list_count = 0; |
308 for (FreeChunk* fc = _indexedFreeList[i].head(); fc != NULL; | 325 for (FreeChunk* fc = _indexedFreeList[i].head(); fc != NULL; |
309 fc = fc->next()) { | 326 fc = fc->next()) { |
310 total_list_count++; | 327 total_list_count++; |