# HG changeset patch # User fparain # Date 1374852272 0 # Node ID 83ca9dc4564dd1953216d3614845b500a74b81c5 # Parent b6baf306e6981936f4078a52c7c22260f307a6e2 8019845: Memory leak during class redefinition Reviewed-by: acorn, jmasa, coleenp, dcubed, mgerdin diff -r b6baf306e698 -r 83ca9dc4564d src/share/vm/memory/metaspace.cpp --- a/src/share/vm/memory/metaspace.cpp Fri Jul 26 05:54:01 2013 -0700 +++ b/src/share/vm/memory/metaspace.cpp Fri Jul 26 15:24:32 2013 +0000 @@ -2254,10 +2254,11 @@ void SpaceManager::deallocate(MetaWord* p, size_t word_size) { assert_lock_strong(_lock); + size_t raw_word_size = get_raw_word_size(word_size); size_t min_size = TreeChunk::min_size(); - assert(word_size >= min_size, + assert(raw_word_size >= min_size, err_msg("Should not deallocate dark matter " SIZE_FORMAT, word_size)); - block_freelists()->return_block(p, word_size); + block_freelists()->return_block(p, raw_word_size); } // Adds a chunk to the list of chunks in use.