equal
deleted
inserted
replaced
223 // be the criteria for clearing SoftReferences. |
223 // be the criteria for clearing SoftReferences. |
224 if (Verbose && PrintGCDetails && UseConcMarkSweepGC) { |
224 if (Verbose && PrintGCDetails && UseConcMarkSweepGC) { |
225 gclog_or_tty->print_cr("\nCMS full GC for Metaspace"); |
225 gclog_or_tty->print_cr("\nCMS full GC for Metaspace"); |
226 } |
226 } |
227 heap->collect_as_vm_thread(GCCause::_metadata_GC_threshold); |
227 heap->collect_as_vm_thread(GCCause::_metadata_GC_threshold); |
228 _result = _loader_data->metaspace_non_null()->allocate(_size, _mdtype); |
228 // After a GC try to allocate without expanding. Could fail |
|
229 // and expansion will be tried below. |
|
230 _result = |
|
231 _loader_data->metaspace_non_null()->allocate(_size, _mdtype); |
229 } |
232 } |
230 if (_result == NULL && !UseConcMarkSweepGC /* CMS already tried */) { |
233 if (_result == NULL && !UseConcMarkSweepGC /* CMS already tried */) { |
231 // If still failing, allow the Metaspace to expand. |
234 // If still failing, allow the Metaspace to expand. |
232 // See delta_capacity_until_GC() for explanation of the |
235 // See delta_capacity_until_GC() for explanation of the |
233 // amount of the expansion. |
236 // amount of the expansion. |