1.1 --- a/src/share/vm/utilities/globalDefinitions.hpp Fri Aug 31 16:39:35 2012 -0700 1.2 +++ b/src/share/vm/utilities/globalDefinitions.hpp Sat Sep 01 13:25:18 2012 -0400 1.3 @@ -128,6 +128,14 @@ 1.4 #endif 1.5 }; 1.6 1.7 +// Analogous opaque struct for metadata allocated from 1.8 +// metaspaces. 1.9 +class MetaWord { 1.10 + friend class VMStructs; 1.11 + private: 1.12 + char* i; 1.13 +}; 1.14 + 1.15 // HeapWordSize must be 2^LogHeapWordSize. 1.16 const int HeapWordSize = sizeof(HeapWord); 1.17 #ifdef _LP64 1.18 @@ -272,6 +280,10 @@ 1.19 inline size_t pointer_delta(const HeapWord* left, const HeapWord* right) { 1.20 return pointer_delta(left, right, sizeof(HeapWord)); 1.21 } 1.22 +// A version specialized for MetaWord*'s. 1.23 +inline size_t pointer_delta(const MetaWord* left, const MetaWord* right) { 1.24 + return pointer_delta(left, right, sizeof(MetaWord)); 1.25 +} 1.26 1.27 // 1.28 // ANSI C++ does not allow casting from one pointer type to a function pointer 1.29 @@ -482,7 +494,8 @@ 1.30 T_VOID = 14, 1.31 T_ADDRESS = 15, 1.32 T_NARROWOOP= 16, 1.33 - T_CONFLICT = 17, // for stack value type with conflicting contents 1.34 + T_METADATA = 17, 1.35 + T_CONFLICT = 18, // for stack value type with conflicting contents 1.36 T_ILLEGAL = 99 1.37 }; 1.38 1.39 @@ -854,6 +867,7 @@ 1.40 class JavaCallWrapper; 1.41 1.42 class oopDesc; 1.43 +class metaDataOopDesc; 1.44 1.45 class NativeCall; 1.46 1.47 @@ -911,6 +925,7 @@ 1.48 const int uninitBlockPad = 0xF1; // value used to zap newly malloc'd blocks. 1.49 const intptr_t badJNIHandleVal = (intptr_t) CONST64(0xFEFEFEFEFEFEFEFE); // value used to zap jni handle area 1.50 const juint badHeapWordVal = 0xBAADBABE; // value used to zap heap after GC 1.51 +const juint badMetaWordVal = 0xBAADFADE; // value used to zap metadata heap after GC 1.52 const int badCodeHeapNewVal= 0xCC; // value used to zap Code heap at allocation 1.53 const int badCodeHeapFreeVal = 0xDD; // value used to zap Code heap at deallocation 1.54