Fri, 28 Oct 2011 13:04:10 -0400
Merge
1.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp Fri Oct 28 12:49:16 2011 -0400 1.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp Fri Oct 28 13:04:10 2011 -0400 1.3 @@ -50,8 +50,8 @@ 1.4 int CompactibleFreeListSpace::_lockRank = Mutex::leaf + 3; 1.5 1.6 // Defaults are 0 so things will break badly if incorrectly initialized. 1.7 -int CompactibleFreeListSpace::IndexSetStart = 0; 1.8 -int CompactibleFreeListSpace::IndexSetStride = 0; 1.9 +size_t CompactibleFreeListSpace::IndexSetStart = 0; 1.10 +size_t CompactibleFreeListSpace::IndexSetStride = 0; 1.11 1.12 size_t MinChunkSize = 0; 1.13 1.14 @@ -62,7 +62,7 @@ 1.15 MinChunkSize = numQuanta(sizeof(FreeChunk), MinObjAlignmentInBytes) * MinObjAlignment; 1.16 1.17 assert(IndexSetStart == 0 && IndexSetStride == 0, "already set"); 1.18 - IndexSetStart = (int) MinChunkSize; 1.19 + IndexSetStart = MinChunkSize; 1.20 IndexSetStride = MinObjAlignment; 1.21 } 1.22 1.23 @@ -250,7 +250,7 @@ 1.24 } 1.25 1.26 void CompactibleFreeListSpace::resetIndexedFreeListArray() { 1.27 - for (int i = 1; i < IndexSetSize; i++) { 1.28 + for (size_t i = 1; i < IndexSetSize; i++) { 1.29 assert(_indexedFreeList[i].size() == (size_t) i, 1.30 "Indexed free list sizes are incorrect"); 1.31 _indexedFreeList[i].reset(IndexSetSize); 1.32 @@ -337,7 +337,7 @@ 1.33 1.34 size_t CompactibleFreeListSpace::totalCountInIndexedFreeLists() const { 1.35 size_t count = 0; 1.36 - for (int i = (int)MinChunkSize; i < IndexSetSize; i++) { 1.37 + for (size_t i = IndexSetStart; i < IndexSetSize; i++) { 1.38 debug_only( 1.39 ssize_t total_list_count = 0; 1.40 for (FreeChunk* fc = _indexedFreeList[i].head(); fc != NULL; 1.41 @@ -2200,7 +2200,7 @@ 1.42 1.43 void CompactibleFreeListSpace::clearFLCensus() { 1.44 assert_locked(); 1.45 - int i; 1.46 + size_t i; 1.47 for (i = IndexSetStart; i < IndexSetSize; i += IndexSetStride) { 1.48 FreeList *fl = &_indexedFreeList[i]; 1.49 fl->set_prevSweep(fl->count()); 1.50 @@ -2494,7 +2494,7 @@ 1.51 1.52 void CompactibleFreeListSpace::verifyIndexedFreeLists() const { 1.53 size_t i = 0; 1.54 - for (; i < MinChunkSize; i++) { 1.55 + for (; i < IndexSetStart; i++) { 1.56 guarantee(_indexedFreeList[i].head() == NULL, "should be NULL"); 1.57 } 1.58 for (; i < IndexSetSize; i++) { 1.59 @@ -2507,7 +2507,7 @@ 1.60 FreeChunk* tail = _indexedFreeList[size].tail(); 1.61 size_t num = _indexedFreeList[size].count(); 1.62 size_t n = 0; 1.63 - guarantee(((size >= MinChunkSize) && (size % IndexSetStride == 0)) || fc == NULL, 1.64 + guarantee(((size >= IndexSetStart) && (size % IndexSetStride == 0)) || fc == NULL, 1.65 "Slot should have been empty"); 1.66 for (; fc != NULL; fc = fc->next(), n++) { 1.67 guarantee(fc->size() == size, "Size inconsistency"); 1.68 @@ -2527,7 +2527,7 @@ 1.69 "else MIN_TREE_CHUNK_SIZE is wrong"); 1.70 assert((IndexSetStride == 2 && IndexSetStart == 4) || // 32-bit 1.71 (IndexSetStride == 1 && IndexSetStart == 3), "just checking"); // 64-bit 1.72 - assert((IndexSetStride != 2) || (MinChunkSize % 2 == 0), 1.73 + assert((IndexSetStride != 2) || (IndexSetStart % 2 == 0), 1.74 "Some for-loops may be incorrectly initialized"); 1.75 assert((IndexSetStride != 2) || (IndexSetSize % 2 == 1), 1.76 "For-loops that iterate over IndexSet with stride 2 may be wrong");
2.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp Fri Oct 28 12:49:16 2011 -0400 2.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp Fri Oct 28 13:04:10 2011 -0400 2.3 @@ -104,8 +104,8 @@ 2.4 SmallForDictionary = 257, // size < this then use _indexedFreeList 2.5 IndexSetSize = SmallForDictionary // keep this odd-sized 2.6 }; 2.7 - static int IndexSetStart; 2.8 - static int IndexSetStride; 2.9 + static size_t IndexSetStart; 2.10 + static size_t IndexSetStride; 2.11 2.12 private: 2.13 enum FitStrategyOptions {