< prev index next >

src/hotspot/share/memory/allocation.cpp

Print this page
*** 79,11 ***
  }
  
  void* MetaspaceObj::operator new(size_t size, ClassLoaderData* loader_data,
                                   size_t word_size,
                                   MetaspaceObj::Type type) throw() {
!   assert(!Thread::current()->is_Java_thread(), "only allowed by non-Java thread");
    return Metaspace::allocate(loader_data, word_size, type);
  }
  
  bool MetaspaceObj::is_valid(const MetaspaceObj* p) {
    // Weed out obvious bogus values first without traversing metaspace
--- 79,11 ---
  }
  
  void* MetaspaceObj::operator new(size_t size, ClassLoaderData* loader_data,
                                   size_t word_size,
                                   MetaspaceObj::Type type) throw() {
!   assert(!Thread::current()->is_Java_thread() || is_training_data(type), "only allowed by non-Java thread");
    return Metaspace::allocate(loader_data, word_size, type);
  }
  
  bool MetaspaceObj::is_valid(const MetaspaceObj* p) {
    // Weed out obvious bogus values first without traversing metaspace
< prev index next >