< prev index next >

src/hotspot/share/memory/metaspaceShared.hpp

Print this page




 215   // JVM/TI RedefineClasses() support:
 216   // Remap the shared readonly space to shared readwrite, private if
 217   // sharing is enabled. Simply returns true if sharing is not enabled
 218   // or if the remapping has already been done by a prior call.
 219   static bool remap_shared_readonly_as_readwrite() NOT_CDS_RETURN_(true);
 220   static bool remapped_readwrite() {
 221     CDS_ONLY(return _remapped_readwrite);
 222     NOT_CDS(return false);
 223   }
 224 
 225   static void print_shared_spaces();
 226 
 227   static bool try_link_class(InstanceKlass* ik, TRAPS);
 228   static void link_and_cleanup_shared_classes(TRAPS);
 229   static void check_shared_class_loader_type(InstanceKlass* ik);
 230 
 231   // Allocate a block of memory from the "mc", "ro", or "rw" regions.
 232   static char* misc_code_space_alloc(size_t num_bytes);
 233   static char* read_only_space_alloc(size_t num_bytes);
 234 


 235   template <typename T>
 236   static Array<T>* new_ro_array(int length) {
 237 #if INCLUDE_CDS
 238     size_t byte_size = Array<T>::byte_sizeof(length, sizeof(T));
 239     Array<T>* array = (Array<T>*)read_only_space_alloc(byte_size);
 240     array->initialize(length);
 241     return array;
 242 #else
 243     return NULL;
 244 #endif
 245   }
 246 
 247   static address cds_i2i_entry_code_buffers(size_t total_size);
 248 
 249   static address cds_i2i_entry_code_buffers() {
 250     return _cds_i2i_entry_code_buffers;
 251   }
 252   static size_t cds_i2i_entry_code_buffers_size() {
 253     return _cds_i2i_entry_code_buffers_size;
 254   }


 215   // JVM/TI RedefineClasses() support:
 216   // Remap the shared readonly space to shared readwrite, private if
 217   // sharing is enabled. Simply returns true if sharing is not enabled
 218   // or if the remapping has already been done by a prior call.
 219   static bool remap_shared_readonly_as_readwrite() NOT_CDS_RETURN_(true);
 220   static bool remapped_readwrite() {
 221     CDS_ONLY(return _remapped_readwrite);
 222     NOT_CDS(return false);
 223   }
 224 
 225   static void print_shared_spaces();
 226 
 227   static bool try_link_class(InstanceKlass* ik, TRAPS);
 228   static void link_and_cleanup_shared_classes(TRAPS);
 229   static void check_shared_class_loader_type(InstanceKlass* ik);
 230 
 231   // Allocate a block of memory from the "mc", "ro", or "rw" regions.
 232   static char* misc_code_space_alloc(size_t num_bytes);
 233   static char* read_only_space_alloc(size_t num_bytes);
 234 
 235   static char* read_only_space_top();
 236 
 237   template <typename T>
 238   static Array<T>* new_ro_array(int length) {
 239 #if INCLUDE_CDS
 240     size_t byte_size = Array<T>::byte_sizeof(length, sizeof(T));
 241     Array<T>* array = (Array<T>*)read_only_space_alloc(byte_size);
 242     array->initialize(length);
 243     return array;
 244 #else
 245     return NULL;
 246 #endif
 247   }
 248 
 249   static address cds_i2i_entry_code_buffers(size_t total_size);
 250 
 251   static address cds_i2i_entry_code_buffers() {
 252     return _cds_i2i_entry_code_buffers;
 253   }
 254   static size_t cds_i2i_entry_code_buffers_size() {
 255     return _cds_i2i_entry_code_buffers_size;
 256   }
< prev index next >