hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp
void ThreadLocalAllocBuffer::fill(HeapWord* start,
HeapWord* top,
size_t new_size) {
{- -------------------------------------------
(1) _number_of_refills フィールドの値をインクリメントしておく.
---------------------------------------- -}
_number_of_refills++;
{- -------------------------------------------
(1) (トレース出力)
---------------------------------------- -}
if (PrintTLAB && Verbose) {
print_stats("fill");
}
{- -------------------------------------------
(1) (assert)
---------------------------------------- -}
assert(top <= start + new_size - alignment_reserve(), "size too small");
{- -------------------------------------------
(1) ThreadLocalAllocBuffer::initialize() を呼んで, 各フィールドを 0 に初期化しておく.
---------------------------------------- -}
initialize(start, top, start + new_size - alignment_reserve());
{- -------------------------------------------
(1) ThreadLocalAllocBuffer::refill_waste_limit() の値を初期値に戻しておく.
(See: CollectedHeap::allocate_from_tlab_slow())
---------------------------------------- -}
// Reset amount of internal fragmentation
set_refill_waste_limit(initial_refill_waste_limit());
}
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.