--- old/src/hotspot/share/gc/g1/g1AllocRegion.cpp 2018-10-18 14:45:39.008932774 +0200 +++ new/src/hotspot/share/gc/g1/g1AllocRegion.cpp 2018-10-18 14:45:38.688919034 +0200 @@ -26,6 +26,7 @@ #include "gc/g1/g1AllocRegion.inline.hpp" #include "gc/g1/g1EvacStats.inline.hpp" #include "gc/g1/g1CollectedHeap.inline.hpp" +#include "gc/shared/fill.hpp" #include "logging/log.hpp" #include "logging/logStream.hpp" #include "memory/resourceArea.hpp" @@ -71,13 +72,13 @@ // allocate in this region anyway (all allocation requests will be // of a size larger than this) so we won't have to perform the dummy // allocation. - size_t min_word_size_to_fill = CollectedHeap::min_fill_size(); + size_t min_word_size_to_fill = Fill::min_size(); while (free_word_size >= min_word_size_to_fill) { HeapWord* dummy = par_allocate(alloc_region, free_word_size); if (dummy != NULL) { // If the allocation was successful we should fill in the space. - CollectedHeap::fill_with_object(dummy, free_word_size); + Fill::range(dummy, free_word_size); alloc_region->set_pre_dummy_top(dummy); result += free_word_size * HeapWordSize; break; @@ -379,14 +380,14 @@ // We are not at a card boundary. Fill up, possibly into the next, taking the // end of the region and the minimum object size into account. to_allocate_words = MIN2(pointer_delta(cur->end(), cur->top(), HeapWordSize), - MAX2(to_allocate_words, G1CollectedHeap::min_fill_size())); + MAX2(to_allocate_words, Fill::min_size())); // Skip allocation if there is not enough space to allocate even the smallest // possible object. In this case this region will not be retained, so the // original problem cannot occur. - if (to_allocate_words >= G1CollectedHeap::min_fill_size()) { + if (to_allocate_words >= Fill::min_size()) { HeapWord* dummy = attempt_allocation(to_allocate_words); - CollectedHeap::fill_with_object(dummy, to_allocate_words); + Fill::range(dummy, to_allocate_words); } } }