hotspot/src/share/vm/utilities/array.hpp
changeset 27680 8ecc0871c18e
parent 25500 4d2e06147d1e
child 33105 294e48b4f704
equal deleted inserted replaced
27679:06b3a53d7781 27680:8ecc0871c18e
   320   void operator=(const Array<T>&);
   320   void operator=(const Array<T>&);
   321 
   321 
   322   void* operator new(size_t size, ClassLoaderData* loader_data, int length, bool read_only, TRAPS) throw() {
   322   void* operator new(size_t size, ClassLoaderData* loader_data, int length, bool read_only, TRAPS) throw() {
   323     size_t word_size = Array::size(length);
   323     size_t word_size = Array::size(length);
   324     return (void*) Metaspace::allocate(loader_data, word_size, read_only,
   324     return (void*) Metaspace::allocate(loader_data, word_size, read_only,
   325                                        MetaspaceObj::array_type(sizeof(T)), CHECK_NULL);
   325                                        MetaspaceObj::array_type(sizeof(T)), THREAD);
   326   }
   326   }
   327 
   327 
   328   static size_t byte_sizeof(int length) { return sizeof(Array<T>) + MAX2(length - 1, 0) * sizeof(T); }
   328   static size_t byte_sizeof(int length) { return sizeof(Array<T>) + MAX2(length - 1, 0) * sizeof(T); }
   329 
   329 
   330   // WhiteBox API helper.
   330   // WhiteBox API helper.