# HG changeset patch # User stefank # Date 1381840340 -7200 # Node ID 59f433c86d9d41905e95a766482fe95ba1642891 # Parent 0a687ee7097d714fbb7fcaf3d49a32367bd118e3 8026392: Metachunks and Metablocks are using a too large alignment Reviewed-by: coleenp, jmasa diff -r 0a687ee7097d -r 59f433c86d9d hotspot/src/share/vm/memory/metachunk.cpp --- a/hotspot/src/share/vm/memory/metachunk.cpp Tue Oct 15 14:28:51 2013 +0200 +++ b/hotspot/src/share/vm/memory/metachunk.cpp Tue Oct 15 14:32:20 2013 +0200 @@ -33,7 +33,14 @@ const size_t metadata_chunk_initialize = 0xf7f7f7f7; size_t Metachunk::object_alignment() { - return ARENA_AMALLOC_ALIGNMENT; + // Must align pointers and sizes to 8, + // so that 64 bit types get correctly aligned. + const size_t alignment = 8; + + // Make sure that the Klass alignment also agree. + STATIC_ASSERT(alignment == (size_t)KlassAlignmentInBytes); + + return alignment; } size_t Metachunk::overhead() {