Get the App
SLTechnology News&Howtos  ›  Development  › 

What does TLAB mean in JVM

Shulou Source: shulou.com Published: 2022-06-02 09:31:49 10月26日 Update

This article mainly introduces the meaning of TLAB in JVM, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

Concept

TLAB (Thread Local Allocation Buffer) thread locally allocates buffers (thread private allocation area, private allocation, public view) and occupies Eden area (1% of the default Eden). When JVM is enabled by default, JVM allocates a TLAB area for each thread to avoid multi-thread synchronization caused by heap object sharing.

Background

Optimizing the object pointer collision problem of multi-thread heap space allocation

Limitation

Generally speaking, the TLAB space is not too large, and large objects go directly into the heap.

TLAB allows space to be wasted, resulting in discontinuity of the Eden area, triggering GC

Allocation strategy

A TLAB area of 100KB, if 80KB has been used, when you need to allocate 30KB objects, the virtual machine has two options: 1. Discard the current TLAB 2. Assign 30KB objects to the heap, leaving the current TLAB assigned to objects smaller than 20KB

Open command

-XX: + UseTLAB (enabled by default)

Thank you for reading this article carefully. I hope the article "what is the meaning of TLAB in JVM" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Tags: Allocation objects threads articles space meaning regions private value interests at the same time commands limitations pointers more friends concepts knowledge strategies buffers Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Apple Shulou Tech Info Linux NVidia