Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: eccbe3f8845e338d653fde40a925f51d6df7d0aa
https://github.com/WebKit/WebKit/commit/eccbe3f8845e338d653fde40a925f51d6df7d0aa
Author: Sosuke Suzuki <[email protected]>
Date: 2026-05-08 (Fri, 08 May 2026)
Changed paths:
M Source/bmalloc/libpas/src/libpas/pas_large_free_heap_helpers.c
M Source/bmalloc/libpas/src/test/LargeFreeHeapTests.cpp
Log Message:
-----------
[libpas] `large_utility_aligned_allocator` unconditionally calls give_back on
allocation failure
https://bugs.webkit.org/show_bug.cgi?id=314368
Reviewed by Yusuke Suzuki.
large_utility_aligned_allocator's setup path only calls
pas_physical_page_sharing_pool_take_later when
pas_large_utility_free_heap_talks_to_large_sharing_pool is set, but the
failure path called pas_physical_page_sharing_pool_give_back
unconditionally. With the flag off, every failed allocation drifts
pas_physical_page_sharing_pool_balance upward by aligned_size, hiding
reclaimable pages from the scavenger.
Add the missing guard and a regression test that drives the failure path
with an always-failing memory source and checks the balance stays at zero
in both flag states.
* Source/bmalloc/libpas/src/libpas/pas_large_free_heap_helpers.c:
(large_utility_aligned_allocator):
* Source/bmalloc/libpas/src/test/LargeFreeHeapTests.cpp:
(std::failingMemorySource):
(std::testGiveBackGuardOnAllocationFailure):
(addLargeFreeHeapTests):
Canonical link: https://commits.webkit.org/312942@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications