--- a/src/hotspot/share/memory/allocation.hpp Mon Oct 29 08:34:33 2018 -0700
+++ b/src/hotspot/share/memory/allocation.hpp Thu Oct 25 11:23:43 2018 -0700
@@ -244,7 +244,6 @@
class MetaspaceClosure;
class MetaspaceObj {
- friend class MetaspaceShared;
// When CDS is enabled, all shared metaspace objects are mapped
// into a single contiguous memory block, so we can use these
// two pointers to quickly determine if something is in the
@@ -263,6 +262,13 @@
}
void print_address_on(outputStream* st) const; // nonvirtual address printing
+ static void set_shared_metaspace_range(void* base, void* top) {
+ _shared_metaspace_base = base;
+ _shared_metaspace_top = top;
+ }
+ static void* shared_metaspace_base() { return _shared_metaspace_base; }
+ static void* shared_metaspace_top() { return _shared_metaspace_top; }
+
#define METASPACE_OBJ_TYPES_DO(f) \
f(Class) \
f(Symbol) \