Skip to main content

Java memory model

Schema

Memory model image

Thread-Local Allocation Buffer section in EDEN space Memory model image

JVM memory allocation

JVM memory allocation

THREAD_TLAB0 --> sg_tlab_0 THREAD_TLAB1 --> sg_tlab_1

UseTLAB setting this will stop the JVM from using TLAB

-XX-UseTLAB

To not allow resizing (if it's filled - all allocations would be in main sync heap)

-XX:-ResizeTLAB

For size settings (per thread)

-XX:TLABSize -XX:MinTLABSize -XX:MaxTLABSize

-Xlog:gc+tlab=trace flag