< prev index next >

src/hotspot/share/memory/metaspaceShared.hpp

Print this page


 322 
 323   // Allocate a block of memory from the "mc" or "ro" regions.
 324   static char* misc_code_space_alloc(size_t num_bytes);
 325   static char* read_only_space_alloc(size_t num_bytes);
 326   static char* read_write_space_alloc(size_t num_bytes);
 327 
 328   template <typename T>
 329   static Array<T>* new_ro_array(int length) {
 330     size_t byte_size = Array<T>::byte_sizeof(length, sizeof(T));
 331     Array<T>* array = (Array<T>*)read_only_space_alloc(byte_size);
 332     array->initialize(length);
 333     return array;
 334   }
 335 
 336   template <typename T>
 337   static Array<T>* new_rw_array(int length) {
 338     size_t byte_size = Array<T>::byte_sizeof(length, sizeof(T));
 339     Array<T>* array = (Array<T>*)read_write_space_alloc(byte_size);
 340     array->initialize(length);
 341     return array;
 342     return NULL;
 343   }
 344 
 345   template <typename T>
 346   static size_t ro_array_bytesize(int length) {
 347     size_t byte_size = Array<T>::byte_sizeof(length, sizeof(T));
 348     return align_up(byte_size, BytesPerWord);
 349   }
 350 
 351   static address i2i_entry_code_buffers(size_t total_size);
 352 
 353   static address i2i_entry_code_buffers() {
 354     return _i2i_entry_code_buffers;
 355   }
 356   static size_t i2i_entry_code_buffers_size() {
 357     return _i2i_entry_code_buffers_size;
 358   }
 359   static void relocate_klass_ptr(oop o);
 360 
 361   static Klass* get_relocated_klass(Klass *k, bool is_final=false);
 362   static Symbol* get_relocated_symbol(Symbol* orig_symbol);




 322 
 323   // Allocate a block of memory from the "mc" or "ro" regions.
 324   static char* misc_code_space_alloc(size_t num_bytes);
 325   static char* read_only_space_alloc(size_t num_bytes);
 326   static char* read_write_space_alloc(size_t num_bytes);
 327 
 328   template <typename T>
 329   static Array<T>* new_ro_array(int length) {
 330     size_t byte_size = Array<T>::byte_sizeof(length, sizeof(T));
 331     Array<T>* array = (Array<T>*)read_only_space_alloc(byte_size);
 332     array->initialize(length);
 333     return array;
 334   }
 335 
 336   template <typename T>
 337   static Array<T>* new_rw_array(int length) {
 338     size_t byte_size = Array<T>::byte_sizeof(length, sizeof(T));
 339     Array<T>* array = (Array<T>*)read_write_space_alloc(byte_size);
 340     array->initialize(length);
 341     return array;

 342   }
 343 
 344   template <typename T>
 345   static size_t ro_array_bytesize(int length) {
 346     size_t byte_size = Array<T>::byte_sizeof(length, sizeof(T));
 347     return align_up(byte_size, BytesPerWord);
 348   }
 349 
 350   static address i2i_entry_code_buffers(size_t total_size);
 351 
 352   static address i2i_entry_code_buffers() {
 353     return _i2i_entry_code_buffers;
 354   }
 355   static size_t i2i_entry_code_buffers_size() {
 356     return _i2i_entry_code_buffers_size;
 357   }
 358   static void relocate_klass_ptr(oop o);
 359 
 360   static Klass* get_relocated_klass(Klass *k, bool is_final=false);
 361   static Symbol* get_relocated_symbol(Symbol* orig_symbol);


< prev index next >