hotspot/src/share/vm/gc/shared/vmGCOperations.cpp
changeset 37149 f025738bbada
parent 37129 af29e306e50b
child 37985 539c597ee0fa
equal deleted inserted replaced
37148:042294ceef52 37149:f025738bbada
   269   _result = _loader_data->metaspace_non_null()->expand_and_allocate(_size, _mdtype);
   269   _result = _loader_data->metaspace_non_null()->expand_and_allocate(_size, _mdtype);
   270   if (_result != NULL) {
   270   if (_result != NULL) {
   271     return;
   271     return;
   272   }
   272   }
   273 
   273 
   274   // If expansion failed, do a last-ditch collection and try allocating
   274   // If expansion failed, do a collection clearing soft references.
   275   // again.  A last-ditch collection will clear softrefs.  This
   275   heap->collect_as_vm_thread(GCCause::_metadata_GC_clear_soft_refs);
   276   // behavior is similar to the last-ditch collection done for perm
       
   277   // gen when it was full and a collection for failed allocation
       
   278   // did not free perm gen space.
       
   279   heap->collect_as_vm_thread(GCCause::_last_ditch_collection);
       
   280   _result = _loader_data->metaspace_non_null()->allocate(_size, _mdtype);
   276   _result = _loader_data->metaspace_non_null()->allocate(_size, _mdtype);
   281   if (_result != NULL) {
   277   if (_result != NULL) {
   282     return;
   278     return;
   283   }
   279   }
   284 
   280