Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: af95d936795d777165e058757baebbbf669767df
      
https://github.com/WebKit/WebKit/commit/af95d936795d777165e058757baebbbf669767df
  Author: Marcus Plutowski <[email protected]>
  Date:   2026-02-02 (Mon, 02 Feb 2026)

  Changed paths:
    M Source/WTF/wtf/SequesteredImmortalHeap.cpp
    M Source/WTF/wtf/SequesteredImmortalHeap.h

  Log Message:
  -----------
  [JSC] Extend SIHeap to support arbitrary number of compiler threads
https://bugs.webkit.org/show_bug.cgi?id=306654
rdar://169305352

Reviewed by Yusuke Suzuki.

Before a thread uses SequesteredArenaMalloc, it must be allocated a
thread-local handle that manages its arena + decommit queue.
Previously, there was a fixed limit to the number of these handles that
can be allocated, imposing upper bound to the number of compiler threads
that can run within a single VM.
This limit was not encountered in practice, as we would not spin up >100
compiler threads in the web use-case where this is currently enabled,
but it was still untidy, and furthermore meant that increasing the size
of the handles (e.g. from 128B to 256B) would have been fraught.
This patch fixes that by providing a fallback for when the base pool of
these handles is exhausted. Further 'blocks' of handles will be
allocated from the immortal allocator, forming a linked list that can be
traversed as necessary. Since these 'blocks' are allocated with 64
handles at a time, we still preserve locality in accessing their
contents, but regardless this list only ever needs to be traversed for
debugging (e.g. logging the index of a given arena), and so is not
performance sensitive in any case.

Canonical link: https://commits.webkit.org/306659@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to