--- old/src/hotspot/share/oops/klass.cpp 2018-09-03 10:46:23.842452812 +0200 +++ new/src/hotspot/share/oops/klass.cpp 2018-09-03 10:46:23.538452816 +0200 @@ -180,17 +180,8 @@ return NULL; } -void* Klass::operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, bool is_value, TRAPS) throw () { - // Pad size in case need adjust to even/odd klass ptr - uintptr_t addr = (uintptr_t) Metaspace::allocate(loader_data, word_size + (1 << LogKlassAlignment), MetaspaceObj::ClassType, THREAD); - // values are odd, otherwise make even (and vice versa) - if (is_value ^ (((addr & KlassPtrValueTypeMask) >> LogKlassAlignmentInBytes) != 0)) { - addr += (1 << LogKlassAlignmentInBytes); - } - assert(is_aligned(addr, (1 << LogKlassAlignmentInBytes)), "Klass base alignment incorrect"); - assert( is_value || ((addr & KlassPtrValueTypeMask) == 0), "Klass even alignment incorrect"); - assert(!is_value || ((addr & KlassPtrValueTypeMask) != 0), "Klass odd alignment incorrect"); - return (void*) addr; +void* Klass::operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, TRAPS) throw() { + return Metaspace::allocate(loader_data, word_size, MetaspaceObj::ClassType, THREAD); } // "Normal" instantiation is preceeded by a MetaspaceObj allocation