746 // HeapBased - Use compressed oops with heap base + encoding. |
746 // HeapBased - Use compressed oops with heap base + encoding. |
747 |
747 |
748 // 4Gb |
748 // 4Gb |
749 static const uint64_t NarrowOopHeapMax = (uint64_t(max_juint) + 1); |
749 static const uint64_t NarrowOopHeapMax = (uint64_t(max_juint) + 1); |
750 // 32Gb |
750 // 32Gb |
751 static const uint64_t OopEncodingHeapMax = NarrowOopHeapMax << LogMinObjAlignmentInBytes; |
751 // OopEncodingHeapMax == NarrowOopHeapMax << LogMinObjAlignmentInBytes; |
752 |
752 |
753 char* Universe::preferred_heap_base(size_t heap_size, NARROW_OOP_MODE mode) { |
753 char* Universe::preferred_heap_base(size_t heap_size, NARROW_OOP_MODE mode) { |
754 size_t base = 0; |
754 size_t base = 0; |
755 #ifdef _LP64 |
755 #ifdef _LP64 |
756 if (UseCompressedOops) { |
756 if (UseCompressedOops) { |
1259 HeapWord* high_boundary) { |
1259 HeapWord* high_boundary) { |
1260 assert(low_boundary < high_boundary, "bad interval"); |
1260 assert(low_boundary < high_boundary, "bad interval"); |
1261 |
1261 |
1262 // decide which low-order bits we require to be clear: |
1262 // decide which low-order bits we require to be clear: |
1263 size_t alignSize = MinObjAlignmentInBytes; |
1263 size_t alignSize = MinObjAlignmentInBytes; |
1264 size_t min_object_size = oopDesc::header_size(); |
1264 size_t min_object_size = CollectedHeap::min_fill_size(); |
1265 |
1265 |
1266 // make an inclusive limit: |
1266 // make an inclusive limit: |
1267 uintptr_t max = (uintptr_t)high_boundary - min_object_size*wordSize; |
1267 uintptr_t max = (uintptr_t)high_boundary - min_object_size*wordSize; |
1268 uintptr_t min = (uintptr_t)low_boundary; |
1268 uintptr_t min = (uintptr_t)low_boundary; |
1269 assert(min < max, "bad interval"); |
1269 assert(min < max, "bad interval"); |