< prev index next >

src/hotspot/share/memory/allocation.cpp

Print this page

        

*** 82,99 **** MetaspaceObj::Type type, TRAPS) throw() { // Klass has it's own operator new return Metaspace::allocate(loader_data, word_size, type, THREAD); } ! bool MetaspaceObj::is_valid(const MetaspaceObj* p) { ! // Weed out obvious bogus values first without traversing metaspace ! if ((size_t)p < os::min_page_size()) { ! return false; ! } else if (!is_aligned((address)p, sizeof(MetaWord))) { ! return false; ! } ! return Metaspace::contains((void*)p); } void MetaspaceObj::print_address_on(outputStream* st) const { st->print(" {" INTPTR_FORMAT "}", p2i(this)); } --- 82,93 ---- MetaspaceObj::Type type, TRAPS) throw() { // Klass has it's own operator new return Metaspace::allocate(loader_data, word_size, type, THREAD); } ! bool MetaspaceObj::is_metaspace_object() const { ! return Metaspace::contains((void*)this); } void MetaspaceObj::print_address_on(outputStream* st) const { st->print(" {" INTPTR_FORMAT "}", p2i(this)); }
< prev index next >