Mercurial > hg > truffle
diff src/share/vm/memory/metaspace.cpp @ 17695:ab36007d6358
8034171: Remove use of template template parameters from binaryTreeDictionary.
Reviewed-by: mgerdin, jmasa
Contributed-by: matthias.baesken@sap.com
author | goetz |
---|---|
date | Tue, 11 Feb 2014 09:34:50 +0100 |
parents | 40353abd7984 |
children | daef39043d2c |
line wrap: on
line diff
--- a/src/share/vm/memory/metaspace.cpp Wed Feb 26 22:11:26 2014 +0100 +++ b/src/share/vm/memory/metaspace.cpp Tue Feb 11 09:34:50 2014 +0100 @@ -46,8 +46,8 @@ #include "utilities/copy.hpp" #include "utilities/debug.hpp" -typedef BinaryTreeDictionary<Metablock, FreeList> BlockTreeDictionary; -typedef BinaryTreeDictionary<Metachunk, FreeList> ChunkTreeDictionary; +typedef BinaryTreeDictionary<Metablock, FreeList<Metablock> > BlockTreeDictionary; +typedef BinaryTreeDictionary<Metachunk, FreeList<Metachunk> > ChunkTreeDictionary; // Set this constant to enable slow integrity checking of the free chunk lists const bool metaspace_slow_verify = false; @@ -790,7 +790,7 @@ return NULL; } - if (word_size < TreeChunk<Metablock, FreeList>::min_size()) { + if (word_size < TreeChunk<Metablock, FreeList<Metablock> >::min_size()) { // Dark matter. Too small for dictionary. return NULL; } @@ -810,7 +810,7 @@ MetaWord* new_block = (MetaWord*)free_block; assert(block_size >= word_size, "Incorrect size of block from freelist"); const size_t unused = block_size - word_size; - if (unused >= TreeChunk<Metablock, FreeList>::min_size()) { + if (unused >= TreeChunk<Metablock, FreeList<Metablock> >::min_size()) { return_block(new_block + word_size, unused); } @@ -2239,7 +2239,7 @@ 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(); + size_t min_size = TreeChunk<Metablock, FreeList<Metablock> >::min_size(); assert(raw_word_size >= min_size, err_msg("Should not deallocate dark matter " SIZE_FORMAT "<" SIZE_FORMAT, word_size, min_size)); block_freelists()->return_block(p, raw_word_size); @@ -2295,7 +2295,7 @@ void SpaceManager::retire_current_chunk() { if (current_chunk() != NULL) { size_t remaining_words = current_chunk()->free_word_size(); - if (remaining_words >= TreeChunk<Metablock, FreeList>::min_size()) { + if (remaining_words >= TreeChunk<Metablock, FreeList<Metablock> >::min_size()) { block_freelists()->return_block(current_chunk()->allocate(remaining_words), remaining_words); inc_used_metrics(remaining_words); } @@ -3278,7 +3278,7 @@ assert(Thread::current()->is_VM_thread(), "should be the VM thread"); // Don't take Heap_lock MutexLockerEx ml(vsm()->lock(), Mutex::_no_safepoint_check_flag); - if (word_size < TreeChunk<Metablock, FreeList>::min_size()) { + if (word_size < TreeChunk<Metablock, FreeList<Metablock> >::min_size()) { // Dark matter. Too small for dictionary. #ifdef ASSERT Copy::fill_to_words((HeapWord*)ptr, word_size, 0xf5f5f5f5); @@ -3293,7 +3293,7 @@ } else { MutexLockerEx ml(vsm()->lock(), Mutex::_no_safepoint_check_flag); - if (word_size < TreeChunk<Metablock, FreeList>::min_size()) { + if (word_size < TreeChunk<Metablock, FreeList<Metablock> >::min_size()) { // Dark matter. Too small for dictionary. #ifdef ASSERT Copy::fill_to_words((HeapWord*)ptr, word_size, 0xf5f5f5f5);