Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp @ 1571:2d127394260e
6916623: Align object to 16 bytes to use Compressed Oops with java heap up to 64Gb
Summary: Added new product ObjectAlignmentInBytes flag to control object alignment.
Reviewed-by: twisti, ysr, iveresov
author | kvn |
---|---|
date | Thu, 27 May 2010 18:01:56 -0700 |
parents | a8127dc669ba |
children | e9ff18c4ace7 |
comparison
equal
deleted
inserted
replaced
1570:de91a2f25c7e | 1571:2d127394260e |
---|---|
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++; |