ZeroTLAB is a Boolean Flag for the JVM, which means whether to zero all bytes in a newly created TLAB.

Default: false

For example: – XX: + ZeroTLAB

When the TLAB is assigned, it is decided whether to assign 0 to each byte according to the ZeroTLAB configuration. In TLAB applications, since TLAB applications occur at object allocation time, that is, the block of memory is immediately used and the assignment is modified. In a multi-core environment, false sharing of CPU cache rows is also involved. In order to optimize, the JVM does Allocation Prefetch. Try to load this memory into the CPU cache, that is, when allocating TLAB memory, it is most efficient to modify memory.

Most fields start with 0, and when TLAB returns to the heap, the remaining space is filled with an array of ints [] filled with 0’s.

So, assigning a 0 when TLAB first allocates avoids assigning a 0 later. The mechanism of Allocation Prefetch can also be used to accommodate CPU cache rows