< prev index next >
src/share/vm/utilities/globalDefinitions.hpp
Print this page
rev 7602 : 8064457: Introduce compressed oops mode disjoint base and improve compressed heap handling.
@@ -122,13 +122,10 @@
extern int LogBytesPerHeapOop; // Oop within a java object
extern int LogBitsPerHeapOop;
extern int BytesPerHeapOop;
extern int BitsPerHeapOop;
-// Oop encoding heap max
-extern uint64_t OopEncodingHeapMax;
-
const int BitsPerJavaInteger = 32;
const int BitsPerJavaLong = 64;
const int BitsPerSize_t = size_tSize * BitsPerByte;
// Size of a char[] needed to represent a jint as a string in decimal.
@@ -193,11 +190,10 @@
// bytes.
inline size_t heap_word_size(size_t byte_size) {
return (byte_size + (HeapWordSize-1)) >> LogHeapWordSize;
}
-
const size_t K = 1024;
const size_t M = K*K;
const size_t G = M*K;
const size_t HWperKB = K / sizeof(HeapWord);
@@ -395,11 +391,20 @@
const int LogKlassAlignmentInBytes = 3;
const int LogKlassAlignment = LogKlassAlignmentInBytes - LogHeapWordSize;
const int KlassAlignmentInBytes = 1 << LogKlassAlignmentInBytes;
const int KlassAlignment = KlassAlignmentInBytes / HeapWordSize;
-// Klass encoding metaspace max size
+// Maximal size of heap where unscaled compression can be used. Also upper bound
+// for heap placement: 4GB.
+const uint64_t UnscaledOopHeapMax = (uint64_t(max_juint) + 1);
+// Maximal size of heap where compressed oops can be used. Also upper bound for heap
+// placement for zero based compression algorithm: UnscaledOopHeapMax << LogMinObjAlignmentInBytes.
+extern uint64_t OopEncodingHeapMax;
+
+// Maximal size of compressed class space. Above this limit compression is not possible.
+// Also upper bound for placement of zero based class space. (Class space is further limited
+// to be < 3G, see arguments.cpp.)
const uint64_t KlassEncodingMetaspaceMax = (uint64_t(max_juint) + 1) << LogKlassAlignmentInBytes;
// Machine dependent stuff
#if defined(X86) && defined(COMPILER2) && !defined(JAVASE_EMBEDDED)
< prev index next >