< prev index next >
src/hotspot/share/memory/metaspaceShared.cpp
Print this page
@@ -74,10 +74,11 @@
MetaspaceSharedStats MetaspaceShared::_stats;
bool MetaspaceShared::_has_error_classes;
bool MetaspaceShared::_archive_loading_failed = false;
bool MetaspaceShared::_remapped_readwrite = false;
bool MetaspaceShared::_open_archive_heap_region_mapped = false;
+bool MetaspaceShared::_archive_heap_region_fixed = false;
address MetaspaceShared::_cds_i2i_entry_code_buffers = NULL;
size_t MetaspaceShared::_cds_i2i_entry_code_buffers_size = 0;
size_t MetaspaceShared::_core_spaces_size = 0;
// The CDS archive is divided into the following regions:
@@ -1938,10 +1939,12 @@
}
return archived_oop;
}
oop MetaspaceShared::materialize_archived_object(narrowOop v) {
+ assert(archive_heap_region_fixed(),
+ "must be called after archive heap regions are fixed");
if (!CompressedOops::is_null(v)) {
oop obj = HeapShared::decode_with_archived_oop_encoding_mode(v);
return G1CollectedHeap::heap()->materialize_archived_object(obj);
}
return NULL;
@@ -1968,10 +1971,11 @@
}
void MetaspaceShared::fixup_mapped_heap_regions() {
FileMapInfo *mapinfo = FileMapInfo::current_info();
mapinfo->fixup_mapped_heap_regions();
+ set_archive_heap_region_fixed();
}
#endif // INCLUDE_CDS_JAVA_HEAP
// Closure for serializing initialization data in from a data area
// (ptr_array) read from the shared file.
< prev index next >