user2018791
user2018791

Reputation: 1153

Will GC happen when a TLAB(Thread Local Allocation Buffer) is full?

TLABs are allocated in Eden, a TLAB will be allocated when a thread first requires an object, so what happens when a TLAB is full(or maybe nearly full) ? Will another TLAB be allocated for the thread if there is still enough space in Eden or it just trigger a GC ?

Upvotes: 2

Views: 567

Answers (1)

Chris K
Chris K

Reputation: 11927

When the current TLAB fills up, another TLAB will be assigned. No need to perform an eden GC until eden reaches an occupancy threshold.

Upvotes: 2

Related Questions