20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #ifndef SHARE_MEMORY_METASPACESHARED_HPP 26 #define SHARE_MEMORY_METASPACESHARED_HPP 27 28 #include "classfile/compactHashtable.hpp" 29 #include "memory/allocation.hpp" 30 #include "memory/memRegion.hpp" 31 #include "memory/virtualspace.hpp" 32 #include "oops/oop.hpp" 33 #include "utilities/exceptions.hpp" 34 #include "utilities/macros.hpp" 35 #include "utilities/resourceHash.hpp" 36 37 #define MAX_SHARED_DELTA (0x7FFFFFFF) 38 39 class FileMapInfo; 40 41 class MetaspaceSharedStats { 42 public: 43 MetaspaceSharedStats() { 44 memset(this, 0, sizeof(*this)); 45 } 46 CompactHashtableStats symbol; 47 CompactHashtableStats string; 48 }; 49 50 #if INCLUDE_CDS 51 class DumpRegion { 52 private: 53 const char* _name; 54 char* _base; 55 char* _top; 56 char* _end; 57 bool _is_packed; 58 59 public: 60 DumpRegion(const char* name) : _name(name), _base(NULL), _top(NULL), _end(NULL), _is_packed(false) {} 61 62 char* expand_top_to(char* newtop); 63 char* allocate(size_t num_bytes, size_t alignment=BytesPerWord); 64 65 void append_intptr_t(intptr_t n) { 66 assert(is_aligned(_top, sizeof(intptr_t)), "bad alignment"); 67 intptr_t *p = (intptr_t*)_top; 68 char* newtop = _top + sizeof(intptr_t); 69 expand_top_to(newtop); 70 *p = n; 71 } 72 73 char* base() const { return _base; } 74 char* top() const { return _top; } 75 char* end() const { return _end; } 76 size_t reserved() const { return _end - _base; } 77 size_t used() const { return _top - _base; } 78 bool is_packed() const { return _is_packed; } 79 bool is_allocatable() const { 80 return !is_packed() && _base != NULL; 81 } 82 83 void print(size_t total_bytes) const; 84 void print_out_of_space_msg(const char* failing_region, size_t needed_bytes); 85 86 void init(const ReservedSpace* rs, char* base) { 87 if (base == NULL) { 88 base = rs->base(); 89 } 90 assert(rs->contains(base), "must be"); 91 _base = _top = base; 100 void pack(DumpRegion* next = NULL); 101 102 bool contains(char* p) { 103 return base() <= p && p < top(); 104 } 105 }; 106 107 // Closure for serializing initialization data out to a data area to be 108 // written to the shared file. 109 110 class WriteClosure : public SerializeClosure { 111 private: 112 DumpRegion* _dump_region; 113 114 public: 115 WriteClosure(DumpRegion* r) { 116 _dump_region = r; 117 } 118 119 void do_ptr(void** p) { 120 _dump_region->append_intptr_t((intptr_t)*p); 121 } 122 123 void do_u4(u4* p) { 124 void* ptr = (void*)(uintx(*p)); 125 do_ptr(&ptr); 126 } 127 128 void do_bool(bool *p) { 129 void* ptr = (void*)(uintx(*p)); 130 do_ptr(&ptr); 131 } 132 133 void do_tag(int tag) { 134 _dump_region->append_intptr_t((intptr_t)tag); 135 } 136 137 void do_oop(oop* o); 138 139 void do_region(u_char* start, size_t size); 140 141 bool reading() const { return false; } 142 }; 143 144 // Closure for serializing initialization data in from a data area 145 // (ptr_array) read from the shared file. 146 147 class ReadClosure : public SerializeClosure { 148 private: 149 intptr_t** _ptr_array; 150 151 inline intptr_t nextPtr() { 152 return *(*_ptr_array)++; 153 } 154 155 public: 156 ReadClosure(intptr_t** ptr_array) { _ptr_array = ptr_array; } 157 158 void do_ptr(void** p); 159 160 void do_u4(u4* p); 161 162 void do_bool(bool *p); 163 164 void do_tag(int tag); 165 166 void do_oop(oop *p); 167 168 void do_region(u_char* start, size_t size); 169 170 bool reading() const { return true; } 171 }; 172 173 #endif 174 175 // Class Data Sharing Support 176 class MetaspaceShared : AllStatic { 177 178 // CDS support 179 static ReservedSpace _shared_rs; 180 static VirtualSpace _shared_vs; 181 static int _max_alignment; 182 static MetaspaceSharedStats _stats; 183 static bool _has_error_classes; 184 static bool _archive_loading_failed; 185 static bool _remapped_readwrite; 186 static address _i2i_entry_code_buffers; 187 static size_t _i2i_entry_code_buffers_size; 188 static size_t _core_spaces_size; 189 static void* _shared_metaspace_static_top; 190 public: 191 enum { 192 // core archive spaces 193 mc = 0, // miscellaneous code for method trampolines 194 rw = 1, // read-write shared space in the heap 195 ro = 2, // read-only shared space in the heap 196 md = 3, // miscellaneous data for initializing tables, etc. 197 num_core_spaces = 4, // number of non-string regions 198 num_non_heap_spaces = 4, 199 200 // mapped java heap regions 201 first_closed_archive_heap_region = md + 1, 202 max_closed_archive_heap_region = 2, 203 last_closed_archive_heap_region = first_closed_archive_heap_region + max_closed_archive_heap_region - 1, 204 first_open_archive_heap_region = last_closed_archive_heap_region + 1, 205 max_open_archive_heap_region = 2, 206 last_open_archive_heap_region = first_open_archive_heap_region + max_open_archive_heap_region - 1, 207 208 last_valid_region = last_open_archive_heap_region, 209 n_regions = last_valid_region + 1 // total number of regions 210 }; 211 212 static void prepare_for_dumping() NOT_CDS_RETURN; 213 static void preload_and_dump(TRAPS) NOT_CDS_RETURN; 214 static int preload_classes(const char * class_list_path, 215 TRAPS) NOT_CDS_RETURN_(0); 216 217 static GrowableArray<Klass*>* collected_klasses(); 218 219 static ReservedSpace* shared_rs() { 220 CDS_ONLY(return &_shared_rs); 221 NOT_CDS(return NULL); 222 } 223 static void commit_shared_space_to(char* newtop) NOT_CDS_RETURN; 224 static size_t core_spaces_size() { 225 assert(DumpSharedSpaces || UseSharedSpaces, "sanity"); 226 assert(_core_spaces_size != 0, "sanity"); 227 return _core_spaces_size; 228 } 229 static void initialize_dumptime_shared_and_meta_spaces() NOT_CDS_RETURN; 230 static void initialize_runtime_shared_and_meta_spaces() NOT_CDS_RETURN; 231 static char* initialize_dynamic_runtime_shared_spaces( 232 char* static_start, char* static_end) NOT_CDS_RETURN_(NULL); 233 static void post_initialize(TRAPS) NOT_CDS_RETURN; 234 235 // Delta of this object from SharedBaseAddress 236 static uintx object_delta_uintx(void* obj); 237 238 static u4 object_delta_u4(void* obj) { 239 // offset is guaranteed to be less than MAX_SHARED_DELTA in DumpRegion::expand_top_to() 240 uintx deltax = object_delta_uintx(obj); 241 guarantee(deltax <= MAX_SHARED_DELTA, "must be 32-bit offset"); 242 return (u4)deltax; 243 } 244 245 static void set_archive_loading_failed() { 246 _archive_loading_failed = true; 247 } 248 static bool map_shared_spaces(FileMapInfo* mapinfo) NOT_CDS_RETURN_(false); 249 static void initialize_shared_spaces() NOT_CDS_RETURN; 250 251 // Return true if given address is in the shared metaspace regions (i.e., excluding any 252 // mapped shared heap regions.) 253 static bool is_in_shared_metaspace(const void* p) { 254 // If no shared metaspace regions are mapped, MetaspceObj::_shared_metaspace_{base,top} will 255 // both be NULL and all values of p will be rejected quickly. 256 return (p < MetaspaceObj::shared_metaspace_top() && p >= MetaspaceObj::shared_metaspace_base()); 257 } 258 259 static address shared_metaspace_top() { 260 return (address)MetaspaceObj::shared_metaspace_top(); 261 } 262 263 static void set_shared_metaspace_range(void* base, void* top) NOT_CDS_RETURN; 264 265 // Return true if given address is in the shared region corresponding to the idx 266 static bool is_in_shared_region(const void* p, int idx) NOT_CDS_RETURN_(false); 267 268 static bool is_in_trampoline_frame(address addr) NOT_CDS_RETURN_(false); 269 270 static bool is_shared_dynamic(void* p) NOT_CDS_RETURN_(false); 271 272 static void allocate_cpp_vtable_clones(); 273 static intptr_t* clone_cpp_vtables(intptr_t* p); 274 static void zero_cpp_vtable_clones_for_writing(); 275 static void patch_cpp_vtable_pointers(); 276 static void serialize_cloned_cpp_vtptrs(SerializeClosure* sc); 277 278 static bool is_valid_shared_method(const Method* m) NOT_CDS_RETURN_(false); 279 static void serialize(SerializeClosure* sc) NOT_CDS_RETURN; 280 281 static MetaspaceSharedStats* stats() { 282 return &_stats; 283 } 284 285 static void report_out_of_space(const char* name, size_t needed_bytes); 286 287 // JVM/TI RedefineClasses() support: 288 // Remap the shared readonly space to shared readwrite, private if 289 // sharing is enabled. Simply returns true if sharing is not enabled 290 // or if the remapping has already been done by a prior call. 291 static bool remap_shared_readonly_as_readwrite() NOT_CDS_RETURN_(true); 292 static bool remapped_readwrite() { 293 CDS_ONLY(return _remapped_readwrite); 294 NOT_CDS(return false); 295 } 296 297 static bool try_link_class(InstanceKlass* ik, TRAPS); 298 static void link_and_cleanup_shared_classes(TRAPS); 299 300 #if INCLUDE_CDS 301 static ReservedSpace* reserve_shared_rs(size_t size, size_t alignment, 302 bool large, char* requested_address); 303 static void init_shared_dump_space(DumpRegion* first_space, address first_space_bottom = NULL); 304 static DumpRegion* misc_code_dump_space(); 305 static DumpRegion* read_write_dump_space(); 306 static DumpRegion* read_only_dump_space(); 307 static void pack_dump_space(DumpRegion* current, DumpRegion* next, 308 ReservedSpace* rs); 309 310 static void rewrite_nofast_bytecodes_and_calculate_fingerprints(InstanceKlass* ik); 311 #endif 312 313 // Allocate a block of memory from the "mc", "ro", or "rw" regions. 314 static char* misc_code_space_alloc(size_t num_bytes); 315 static char* read_only_space_alloc(size_t num_bytes); 316 317 template <typename T> 318 static Array<T>* new_ro_array(int length) { 319 #if INCLUDE_CDS 320 size_t byte_size = Array<T>::byte_sizeof(length, sizeof(T)); 321 Array<T>* array = (Array<T>*)read_only_space_alloc(byte_size); 322 array->initialize(length); 325 return NULL; 326 #endif 327 } 328 329 template <typename T> 330 static size_t ro_array_bytesize(int length) { 331 size_t byte_size = Array<T>::byte_sizeof(length, sizeof(T)); 332 return align_up(byte_size, BytesPerWord); 333 } 334 335 static address i2i_entry_code_buffers(size_t total_size); 336 337 static address i2i_entry_code_buffers() { 338 return _i2i_entry_code_buffers; 339 } 340 static size_t i2i_entry_code_buffers_size() { 341 return _i2i_entry_code_buffers_size; 342 } 343 static void relocate_klass_ptr(oop o); 344 345 static Klass* get_relocated_klass(Klass *k); 346 347 static intptr_t* fix_cpp_vtable_for_dynamic_archive(MetaspaceObj::Type msotype, address obj); 348 349 private: 350 static void read_extra_data(const char* filename, TRAPS) NOT_CDS_RETURN; 351 }; 352 #endif // SHARE_MEMORY_METASPACESHARED_HPP | 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #ifndef SHARE_MEMORY_METASPACESHARED_HPP 26 #define SHARE_MEMORY_METASPACESHARED_HPP 27 28 #include "classfile/compactHashtable.hpp" 29 #include "memory/allocation.hpp" 30 #include "memory/memRegion.hpp" 31 #include "memory/virtualspace.hpp" 32 #include "oops/oop.hpp" 33 #include "utilities/exceptions.hpp" 34 #include "utilities/macros.hpp" 35 #include "utilities/resourceHash.hpp" 36 37 #define MAX_SHARED_DELTA (0x7FFFFFFF) 38 39 class FileMapInfo; 40 class CHeapBitMap; 41 42 enum MapArchiveResult { 43 MAP_ARCHIVE_SUCCESS, 44 MAP_ARCHIVE_MMAP_FAILURE, 45 MAP_ARCHIVE_OTHER_FAILURE 46 }; 47 48 class MetaspaceSharedStats { 49 public: 50 MetaspaceSharedStats() { 51 memset(this, 0, sizeof(*this)); 52 } 53 CompactHashtableStats symbol; 54 CompactHashtableStats string; 55 }; 56 57 #if INCLUDE_CDS 58 class DumpRegion { 59 private: 60 const char* _name; 61 char* _base; 62 char* _top; 63 char* _end; 64 bool _is_packed; 65 66 public: 67 DumpRegion(const char* name) : _name(name), _base(NULL), _top(NULL), _end(NULL), _is_packed(false) {} 68 69 char* expand_top_to(char* newtop); 70 char* allocate(size_t num_bytes, size_t alignment=BytesPerWord); 71 72 void append_intptr_t(intptr_t n, bool need_to_mark = false); 73 74 char* base() const { return _base; } 75 char* top() const { return _top; } 76 char* end() const { return _end; } 77 size_t reserved() const { return _end - _base; } 78 size_t used() const { return _top - _base; } 79 bool is_packed() const { return _is_packed; } 80 bool is_allocatable() const { 81 return !is_packed() && _base != NULL; 82 } 83 84 void print(size_t total_bytes) const; 85 void print_out_of_space_msg(const char* failing_region, size_t needed_bytes); 86 87 void init(const ReservedSpace* rs, char* base) { 88 if (base == NULL) { 89 base = rs->base(); 90 } 91 assert(rs->contains(base), "must be"); 92 _base = _top = base; 101 void pack(DumpRegion* next = NULL); 102 103 bool contains(char* p) { 104 return base() <= p && p < top(); 105 } 106 }; 107 108 // Closure for serializing initialization data out to a data area to be 109 // written to the shared file. 110 111 class WriteClosure : public SerializeClosure { 112 private: 113 DumpRegion* _dump_region; 114 115 public: 116 WriteClosure(DumpRegion* r) { 117 _dump_region = r; 118 } 119 120 void do_ptr(void** p) { 121 _dump_region->append_intptr_t((intptr_t)*p, true); 122 } 123 124 void do_u4(u4* p) { 125 _dump_region->append_intptr_t((intptr_t)(*p)); 126 } 127 128 void do_bool(bool *p) { 129 _dump_region->append_intptr_t((intptr_t)(*p)); 130 } 131 132 void do_tag(int tag) { 133 _dump_region->append_intptr_t((intptr_t)tag); 134 } 135 136 void do_oop(oop* o); 137 138 void do_mirror_oop(oop* o) { do_oop(o); } 139 140 void do_region(u_char* start, size_t size); 141 142 bool reading() const { return false; } 143 }; 144 145 // Closure for serializing initialization data in from a data area 146 // (ptr_array) read from the shared file. 147 148 class ReadClosure : public SerializeClosure { 149 private: 150 intptr_t** _ptr_array; 151 152 inline intptr_t nextPtr() { 153 return *(*_ptr_array)++; 154 } 155 156 public: 157 ReadClosure(intptr_t** ptr_array) { _ptr_array = ptr_array; } 158 159 void do_ptr(void** p); 160 161 void do_u4(u4* p); 162 163 void do_bool(bool *p); 164 165 void do_tag(int tag); 166 167 void do_oop(oop *p); 168 169 void do_mirror_oop(oop* o); 170 171 void do_region(u_char* start, size_t size); 172 173 bool reading() const { return true; } 174 }; 175 176 #endif // INCLUDE_CDS 177 178 // Class Data Sharing Support 179 class MetaspaceShared : AllStatic { 180 181 // CDS support 182 static ReservedSpace _shared_rs; 183 static VirtualSpace _shared_vs; 184 static int _max_alignment; 185 static MetaspaceSharedStats _stats; 186 static bool _has_error_classes; 187 static bool _archive_loading_failed; 188 static bool _remapped_readwrite; 189 static address _i2i_entry_code_buffers; 190 static size_t _i2i_entry_code_buffers_size; 191 static size_t _core_spaces_size; 192 static void* _shared_metaspace_static_top; 193 static intx _mapping_delta; // FIXME rename 194 public: 195 enum { 196 // core archive spaces 197 mc = 0, // miscellaneous code for method trampolines 198 rw = 1, // read-write shared space in the heap 199 ro = 2, // read-only shared space in the heap 200 md = 3, // miscellaneous data for initializing tables, etc. 201 bm = 4, // relocation bitmaps (freed after file mapping is finished) 202 num_core_region = 4, 203 num_non_heap_spaces = 5, 204 205 // mapped java heap regions 206 first_closed_archive_heap_region = bm + 1, 207 max_closed_archive_heap_region = 2, 208 last_closed_archive_heap_region = first_closed_archive_heap_region + max_closed_archive_heap_region - 1, 209 first_open_archive_heap_region = last_closed_archive_heap_region + 1, 210 max_open_archive_heap_region = 2, 211 last_open_archive_heap_region = first_open_archive_heap_region + max_open_archive_heap_region - 1, 212 213 last_valid_region = last_open_archive_heap_region, 214 n_regions = last_valid_region + 1 // total number of regions 215 }; 216 217 static void prepare_for_dumping() NOT_CDS_RETURN; 218 static void preload_and_dump(TRAPS) NOT_CDS_RETURN; 219 static int preload_classes(const char * class_list_path, 220 TRAPS) NOT_CDS_RETURN_(0); 221 222 static GrowableArray<Klass*>* collected_klasses(); 223 224 static ReservedSpace* shared_rs() { 225 CDS_ONLY(return &_shared_rs); 226 NOT_CDS(return NULL); 227 } 228 229 static void set_shared_rs(ReservedSpace rs) { 230 CDS_ONLY(_shared_rs = rs); 231 } 232 233 static void commit_shared_space_to(char* newtop) NOT_CDS_RETURN; 234 static void initialize_dumptime_shared_and_meta_spaces() NOT_CDS_RETURN; 235 static void initialize_runtime_shared_and_meta_spaces() NOT_CDS_RETURN; 236 static void post_initialize(TRAPS) NOT_CDS_RETURN; 237 238 // Delta of this object from SharedBaseAddress 239 static uintx object_delta_uintx(void* obj); 240 241 static u4 object_delta_u4(void* obj) { 242 // offset is guaranteed to be less than MAX_SHARED_DELTA in DumpRegion::expand_top_to() 243 uintx deltax = object_delta_uintx(obj); 244 guarantee(deltax <= MAX_SHARED_DELTA, "must be 32-bit offset"); 245 return (u4)deltax; 246 } 247 248 static void set_archive_loading_failed() { 249 _archive_loading_failed = true; 250 } 251 static bool is_in_output_space(void* ptr) { 252 assert(DumpSharedSpaces, "must be"); 253 return shared_rs()->contains(ptr); 254 } 255 256 static bool map_shared_spaces(FileMapInfo* mapinfo) NOT_CDS_RETURN_(false); 257 static void initialize_shared_spaces() NOT_CDS_RETURN; 258 259 // Return true if given address is in the shared metaspace regions (i.e., excluding any 260 // mapped shared heap regions.) 261 static bool is_in_shared_metaspace(const void* p) { 262 return MetaspaceObj::is_shared((const MetaspaceObj*)p); 263 } 264 265 static address shared_metaspace_top() { 266 return (address)MetaspaceObj::shared_metaspace_top(); 267 } 268 269 static void set_shared_metaspace_range(void* base, void *static_top, void* top) NOT_CDS_RETURN; 270 271 // Return true if given address is in the shared region corresponding to the idx 272 static bool is_in_shared_region(const void* p, int idx) NOT_CDS_RETURN_(false); 273 274 static bool is_in_trampoline_frame(address addr) NOT_CDS_RETURN_(false); 275 276 static bool is_shared_dynamic(void* p) NOT_CDS_RETURN_(false); 277 278 static void allocate_cpp_vtable_clones(); 279 static intptr_t* clone_cpp_vtables(intptr_t* p); 280 static void zero_cpp_vtable_clones_for_writing(); 281 static void patch_cpp_vtable_pointers(); 282 static void serialize_cloned_cpp_vtptrs(SerializeClosure* sc); 283 284 static bool is_valid_shared_method(const Method* m) NOT_CDS_RETURN_(false); 285 static void serialize(SerializeClosure* sc) NOT_CDS_RETURN; 286 287 static MetaspaceSharedStats* stats() { 288 return &_stats; 289 } 290 291 static void report_out_of_space(const char* name, size_t needed_bytes); 292 293 // JVM/TI RedefineClasses() support: 294 // Remap the shared readonly space to shared readwrite, private if 295 // sharing is enabled. Simply returns true if sharing is not enabled 296 // or if the remapping has already been done by a prior call. 297 static bool remap_shared_readonly_as_readwrite() NOT_CDS_RETURN_(true); 298 static bool remapped_readwrite() { 299 CDS_ONLY(return _remapped_readwrite); 300 NOT_CDS(return false); 301 } 302 303 static bool try_link_class(InstanceKlass* ik, TRAPS); 304 static void link_and_cleanup_shared_classes(TRAPS); 305 306 #if INCLUDE_CDS 307 static ReservedSpace reserve_shared_space(size_t size, char* requested_address = NULL); 308 static size_t reserved_space_alignment(); 309 static void init_shared_dump_space(DumpRegion* first_space, address first_space_bottom = NULL); 310 static DumpRegion* misc_code_dump_space(); 311 static DumpRegion* read_write_dump_space(); 312 static DumpRegion* read_only_dump_space(); 313 static void pack_dump_space(DumpRegion* current, DumpRegion* next, 314 ReservedSpace* rs); 315 316 static void rewrite_nofast_bytecodes_and_calculate_fingerprints(InstanceKlass* ik); 317 #endif 318 319 // Allocate a block of memory from the "mc", "ro", or "rw" regions. 320 static char* misc_code_space_alloc(size_t num_bytes); 321 static char* read_only_space_alloc(size_t num_bytes); 322 323 template <typename T> 324 static Array<T>* new_ro_array(int length) { 325 #if INCLUDE_CDS 326 size_t byte_size = Array<T>::byte_sizeof(length, sizeof(T)); 327 Array<T>* array = (Array<T>*)read_only_space_alloc(byte_size); 328 array->initialize(length); 331 return NULL; 332 #endif 333 } 334 335 template <typename T> 336 static size_t ro_array_bytesize(int length) { 337 size_t byte_size = Array<T>::byte_sizeof(length, sizeof(T)); 338 return align_up(byte_size, BytesPerWord); 339 } 340 341 static address i2i_entry_code_buffers(size_t total_size); 342 343 static address i2i_entry_code_buffers() { 344 return _i2i_entry_code_buffers; 345 } 346 static size_t i2i_entry_code_buffers_size() { 347 return _i2i_entry_code_buffers_size; 348 } 349 static void relocate_klass_ptr(oop o); 350 351 static Klass* get_relocated_klass(Klass *k, bool is_final=false); // FIXME name 352 353 static intptr_t* fix_cpp_vtable_for_dynamic_archive(MetaspaceObj::Type msotype, address obj); 354 static void initialize_ptr_marker(CHeapBitMap* ptrmap); 355 static intx mapping_delta() { return _mapping_delta; } // FIXME rename 356 static intx final_delta(); // FIXME rename 357 static bool use_windows_memory_mapping() { 358 const bool is_windows = (NOT_WINDOWS(false) WINDOWS_ONLY(true)); 359 //const bool is_windows = true; // enable this to allow testing the windows mmap semantics on Linux, etc. 360 return is_windows; 361 } 362 private: 363 static void read_extra_data(const char* filename, TRAPS) NOT_CDS_RETURN; 364 static FileMapInfo* open_static_archive(); 365 static FileMapInfo* open_dynamic_archive(); 366 static MapArchiveResult map_archives(FileMapInfo* static_mapinfo, FileMapInfo* dynamic_mapinfo, 367 bool use_requested_addr); 368 static char* reserve_address_space_for_archives(FileMapInfo* static_mapinfo, 369 FileMapInfo* dynamic_mapinfo, 370 bool use_requested_addr, 371 ReservedSpace& main_rs, 372 ReservedSpace& archive_space_rs, 373 ReservedSpace& class_space_rs); 374 static void release_reserved_spaces(ReservedSpace& main_rs, 375 ReservedSpace& archive_space_rs, 376 ReservedSpace& class_space_rs); 377 static MapArchiveResult map_archive(FileMapInfo* mapinfo, char* mapped_base_address, ReservedSpace rs); 378 static void unmap_archive(FileMapInfo* mapinfo); 379 }; 380 #endif // SHARE_MEMORY_METASPACESHARED_HPP |