--- old/src/hotspot/share/gc/g1/g1AllocRegion.inline.hpp 2018-04-23 13:45:26.176213458 +0200 +++ new/src/hotspot/share/gc/g1/g1AllocRegion.inline.hpp 2018-04-23 13:45:25.800198625 +0200 @@ -36,6 +36,10 @@ } while (0) +inline void G1AllocRegion::reset_alloc_region() { + _alloc_region = _dummy_region; +} + inline HeapWord* G1AllocRegion::allocate(HeapRegion* alloc_region, size_t word_size) { assert(alloc_region != NULL, "pre-condition"); @@ -126,4 +130,17 @@ return NULL; } +inline HeapWord* MutatorAllocRegion::attempt_retained_allocation(size_t min_word_size, + size_t desired_word_size, + size_t* actual_word_size) { + if (_retained_alloc_region != NULL) { + HeapWord* result = par_allocate(_retained_alloc_region, min_word_size, desired_word_size, actual_word_size); + if (result != NULL) { + trace("alloc retained", min_word_size, desired_word_size, *actual_word_size, result); + return result; + } + } + return NULL; +} + #endif // SHARE_VM_GC_G1_G1ALLOCREGION_INLINE_HPP