src/hotspot/share/memory/metaspace/spaceManager.cpp
branchstuefe-new-metaspace-branch
changeset 58475 e3aa9f95b85e
parent 58382 2e16658b7776
child 58683 2d5dd194c65c
equal deleted inserted replaced
58383:04d2c850ab4f 58475:e3aa9f95b85e
   251     p = _block_freelist->get_block(raw_word_size);
   251     p = _block_freelist->get_block(raw_word_size);
   252 
   252 
   253     if (p != NULL) {
   253     if (p != NULL) {
   254       DEBUG_ONLY(InternalStats::inc_num_allocs_from_deallocated_blocks();)
   254       DEBUG_ONLY(InternalStats::inc_num_allocs_from_deallocated_blocks();)
   255       log_trace(metaspace)("SpaceManager %s: .. taken from freelist.", _name);
   255       log_trace(metaspace)("SpaceManager %s: .. taken from freelist.", _name);
       
   256       // Note: space in the freeblock dictionary counts as used (see retire_current_chunk()) -
       
   257       // that means that we must not increase the used counter again when allocating from the dictionary.
       
   258       // Therefore we return here.
       
   259       return p;
   256     }
   260     }
   257 
   261 
   258   }
   262   }
   259 
   263 
   260   // 2) Failing that, attempt to allocate from the current chunk. If we hit commit limit, return NULL.
   264   // 2) Failing that, attempt to allocate from the current chunk. If we hit commit limit, return NULL.