Tue, 15 Oct 2013 14:32:20 +0200
8026392: Metachunks and Metablocks are using a too large alignment
Reviewed-by: coleenp, jmasa
src/share/vm/memory/metachunk.cpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/vm/memory/metachunk.cpp Tue Oct 15 14:28:51 2013 +0200 1.2 +++ b/src/share/vm/memory/metachunk.cpp Tue Oct 15 14:32:20 2013 +0200 1.3 @@ -33,7 +33,14 @@ 1.4 const size_t metadata_chunk_initialize = 0xf7f7f7f7; 1.5 1.6 size_t Metachunk::object_alignment() { 1.7 - return ARENA_AMALLOC_ALIGNMENT; 1.8 + // Must align pointers and sizes to 8, 1.9 + // so that 64 bit types get correctly aligned. 1.10 + const size_t alignment = 8; 1.11 + 1.12 + // Make sure that the Klass alignment also agree. 1.13 + STATIC_ASSERT(alignment == (size_t)KlassAlignmentInBytes); 1.14 + 1.15 + return alignment; 1.16 } 1.17 1.18 size_t Metachunk::overhead() {