equal
deleted
inserted
replaced
747 #ifdef _LP64 |
747 #ifdef _LP64 |
748 if (UseCompressedOops) { |
748 if (UseCompressedOops) { |
749 assert(mode == UnscaledNarrowOop || |
749 assert(mode == UnscaledNarrowOop || |
750 mode == ZeroBasedNarrowOop || |
750 mode == ZeroBasedNarrowOop || |
751 mode == HeapBasedNarrowOop, "mode is invalid"); |
751 mode == HeapBasedNarrowOop, "mode is invalid"); |
752 |
752 // Return specified base for the first request. |
|
753 if (!FLAG_IS_DEFAULT(HeapBaseMinAddress) && (mode == UnscaledNarrowOop)) { |
|
754 return (char*)HeapBaseMinAddress; |
|
755 } |
753 const size_t total_size = heap_size + HeapBaseMinAddress; |
756 const size_t total_size = heap_size + HeapBaseMinAddress; |
754 if (total_size <= OopEncodingHeapMax && (mode != HeapBasedNarrowOop)) { |
757 if (total_size <= OopEncodingHeapMax && (mode != HeapBasedNarrowOop)) { |
755 if (total_size <= NarrowOopHeapMax && (mode == UnscaledNarrowOop) && |
758 if (total_size <= NarrowOopHeapMax && (mode == UnscaledNarrowOop) && |
756 (Universe::narrow_oop_shift() == 0)) { |
759 (Universe::narrow_oop_shift() == 0)) { |
757 // Use 32-bits oops without encoding and |
760 // Use 32-bits oops without encoding and |
855 #endif // _WIN64 |
858 #endif // _WIN64 |
856 if((uint64_t)Universe::heap()->reserved_region().end() > NarrowOopHeapMax) { |
859 if((uint64_t)Universe::heap()->reserved_region().end() > NarrowOopHeapMax) { |
857 // Can't reserve heap below 4Gb. |
860 // Can't reserve heap below 4Gb. |
858 Universe::set_narrow_oop_shift(LogMinObjAlignmentInBytes); |
861 Universe::set_narrow_oop_shift(LogMinObjAlignmentInBytes); |
859 } else { |
862 } else { |
860 assert(Universe::narrow_oop_shift() == 0, "use unscaled narrow oop"); |
863 Universe::set_narrow_oop_shift(0); |
861 if (PrintCompressedOopsMode) { |
864 if (PrintCompressedOopsMode) { |
862 tty->print(", 32-bits Oops"); |
865 tty->print(", 32-bits Oops"); |
863 } |
866 } |
864 } |
867 } |
865 } |
868 } |