comparison src/share/vm/memory/universe.cpp @ 976:1a81ea4b45d4

6869822: assert(Universe::narrow_oop_shift() == 0,"use unscaled narrow oop") Summary: Replace the assert with narrow_oop_shift set to 0. Reviewed-by: never, jcoomes
author kvn
date Fri, 14 Aug 2009 12:23:11 -0700
parents df6caf649ff7
children f334aec453a1
comparison
equal deleted inserted replaced
12:9621b52e5fd5 13:378769552338
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 }