8019845: Memory leak during class redefinition
authorfparain
Fri, 26 Jul 2013 15:24:32 +0000
changeset 18987 a1b541fe1159
parent 18986 f8699c86bb40
child 18988 0e7cbc5c39ec
8019845: Memory leak during class redefinition Reviewed-by: acorn, jmasa, coleenp, dcubed, mgerdin
hotspot/src/share/vm/memory/metaspace.cpp
--- a/hotspot/src/share/vm/memory/metaspace.cpp	Fri Jul 26 05:54:01 2013 -0700
+++ b/hotspot/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<Metablock, FreeList>::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.