Skip to content

Conversation

graalvmbot
Copy link
Collaborator

@graalvmbot graalvmbot commented May 28, 2025

Having each allocating thread hold on to an entire aligned chunk becomes a problem when there are many allocating threads, and inflates the heap when the threads rarely allocate and allocate mostly small objects. We should allocate TLAB ranges out of aligned chunks, sized according to the number of allocating threads and expected refills between collections.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label May 28, 2025
@graalvmbot graalvmbot closed this May 31, 2025
@graalvmbot graalvmbot deleted the tschrott/GR-32941 branch May 31, 2025 08:00
@graalvmbot graalvmbot merged commit 0f74838 into master May 31, 2025
12 of 13 checks passed
@roberttoyonaga
Copy link
Collaborator

Hi, this is great! Just a few questions:

Is it the case that this change tries to reduce the overall memory usage (by allowing TLABS to share heap chunks) but will not actually affect the frequency that the slow path is taken?

Am I correct in understanding that even when a new TLAB is able to be created without allocating a new heap chunk there is still contention when making space in the current heap chunk?

There is no dynamic resizing of TLABS, whenever more space is required, the old TLAB must be retired and a new one (with a different) size is created, or allocation is done directly on the heap?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants