Bug 313697

Summary: [SequesteredMalloc] Support arbitrary-size allocations
Product: WebKit Reporter: Marcus Plutowski <marcus_plutowski>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 314224    
Bug Blocks:    

Marcus Plutowski
Reported 2026-04-29 16:35:23 PDT
rdar://175894622 Currently, the SequesteredImmortalHeap only permits allocation from granules of up to 512K. Previous investigations suggested that this would be sufficient (i.e. none of the types which are SequesteredArenaAlloc’d would allocate near to that amount in one go), but either they were wrong or something has changed since then since we now know of situations where this does happen. The ideal solution to this is to have two allocation paths: either go down the current pathway (allocating from within a 512K granule) or allocate from a large-heap structure which maintains a free-list and hashmap of arbitrary-size allocations. This does pose some risk of memory fragmentation in general — this could be ameliorated by landing the patch which pulls in megapage-like structures to reduce the fragmentation induced by the current allocator system. However, since these large-allocations are very likely to be rare in practice, this change can go in without the megapage change for now.
Attachments
Marcus Plutowski
Comment 1 2026-04-29 17:25:19 PDT
EWS
Comment 2 2026-05-06 10:06:26 PDT
Committed 312707@main (c85eac355997): <https://commits.webkit.org/312707@main> Reviewed commits have been landed. Closing PR #63936 and removing active labels.
WebKit Commit Bot
Comment 3 2026-05-06 12:29:16 PDT
Re-opened since this is blocked by bug 314224
Marcus Plutowski
Comment 4 2026-05-06 15:27:54 PDT
EWS
Comment 5 2026-05-07 10:43:18 PDT
Committed 312809@main (06c57fbad9f6): <https://commits.webkit.org/312809@main> Reviewed commits have been landed. Closing PR #64405 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.