hotspot/src/share/vm/memory/metaspace.cpp
changeset 46674 a9e42ff6158f
parent 46625 edefffab74e2
child 46701 f559541c0daa
equal deleted inserted replaced
46671:b7c2e9a24d49 46674:a9e42ff6158f
   938   if (word_size < BlockFreelist::min_dictionary_size()) {
   938   if (word_size < BlockFreelist::min_dictionary_size()) {
   939     // If allocation in small blocks fails, this is Dark Matter.  Too small for dictionary.
   939     // If allocation in small blocks fails, this is Dark Matter.  Too small for dictionary.
   940     return NULL;
   940     return NULL;
   941   }
   941   }
   942 
   942 
   943   Metablock* free_block =
   943   Metablock* free_block = dictionary()->get_chunk(word_size);
   944     dictionary()->get_chunk(word_size, FreeBlockDictionary<Metablock>::atLeast);
       
   945   if (free_block == NULL) {
   944   if (free_block == NULL) {
   946     return NULL;
   945     return NULL;
   947   }
   946   }
   948 
   947 
   949   const size_t block_size = free_block->size();
   948   const size_t block_size = free_block->size();
  1910     free_list->remove_chunk(chunk);
  1909     free_list->remove_chunk(chunk);
  1911 
  1910 
  1912     log_trace(gc, metaspace, freelist)("ChunkManager::free_chunks_get: free_list " PTR_FORMAT " head " PTR_FORMAT " size " SIZE_FORMAT,
  1911     log_trace(gc, metaspace, freelist)("ChunkManager::free_chunks_get: free_list " PTR_FORMAT " head " PTR_FORMAT " size " SIZE_FORMAT,
  1913                                        p2i(free_list), p2i(chunk), chunk->word_size());
  1912                                        p2i(free_list), p2i(chunk), chunk->word_size());
  1914   } else {
  1913   } else {
  1915     chunk = humongous_dictionary()->get_chunk(
  1914     chunk = humongous_dictionary()->get_chunk(word_size);
  1916       word_size,
       
  1917       FreeBlockDictionary<Metachunk>::atLeast);
       
  1918 
  1915 
  1919     if (chunk == NULL) {
  1916     if (chunk == NULL) {
  1920       return NULL;
  1917       return NULL;
  1921     }
  1918     }
  1922 
  1919