--- old/src/hotspot/share/gc/g1/g1Allocator.inline.hpp 2018-05-02 11:22:55.412768633 +0200 +++ new/src/hotspot/share/gc/g1/g1Allocator.inline.hpp 2018-05-02 11:22:55.048754230 +0200 @@ -41,8 +41,14 @@ return &_old_gc_alloc_region; } -inline HeapWord* G1Allocator::attempt_allocation(size_t word_size) { - return mutator_alloc_region()->attempt_allocation(word_size); +inline HeapWord* G1Allocator::attempt_allocation(size_t min_word_size, + size_t desired_word_size, + size_t* actual_word_size) { + HeapWord* result = mutator_alloc_region()->attempt_retained_allocation(min_word_size, desired_word_size, actual_word_size); + if (result != NULL) { + return result; + } + return mutator_alloc_region()->attempt_allocation(min_word_size, desired_word_size, actual_word_size); } inline HeapWord* G1Allocator::attempt_allocation_locked(size_t word_size) {