--- old/src/hotspot/share/gc/g1/g1CollectedHeap.cpp 2018-05-09 00:05:44.710207148 +0200 +++ new/src/hotspot/share/gc/g1/g1CollectedHeap.cpp 2018-05-09 00:05:44.564208958 +0200 @@ -62,6 +62,7 @@ #include "gc/g1/heapRegionSet.inline.hpp" #include "gc/g1/vm_operations_g1.hpp" #include "gc/shared/adaptiveSizePolicy.hpp" +#include "gc/shared/collectedHeap.inline.hpp" #include "gc/shared/gcHeapSummary.hpp" #include "gc/shared/gcId.hpp" #include "gc/shared/gcLocker.hpp" @@ -392,10 +393,14 @@ } HeapWord* -G1CollectedHeap::mem_allocate(size_t word_size, +G1CollectedHeap::mem_allocate(size_t word_size, Klass* klass, Thread* thread, bool* gc_overhead_limit_was_exceeded) { assert_heap_not_locked_and_not_at_safepoint(); + HeapWord* obj = allocate_from_tlab(klass, thread, word_size); + if (obj != NULL) { + return obj; + } if (is_humongous(word_size)) { return attempt_allocation_humongous(word_size); }