8211955: GC abstraction for LAB reserve

Reviewed-by: pliden, shade
This commit is contained in:
Roman Kennke 2018-10-10 23:05:15 +02:00
parent a3a7edbd4d
commit 7d7da8976b
5 changed files with 19 additions and 8 deletions

View file

@ -23,6 +23,7 @@
*/
#include "precompiled.hpp"
#include "gc/shared/collectedHeap.hpp"
#include "gc/shared/threadLocalAllocBuffer.inline.hpp"
#include "logging/log.hpp"
#include "memory/resourceArea.hpp"
@ -461,3 +462,8 @@ void ThreadLocalAllocStats::publish() {
_perf_max_slow_allocations ->set_value(_max_slow_allocations);
}
}
size_t ThreadLocalAllocBuffer::end_reserve() {
size_t reserve_size = Universe::heap()->tlab_alloc_reserve();
return MAX2(reserve_size, (size_t)_reserve_for_allocation_prefetch);
}