[libpas] large_utility_aligned_allocator unconditionally calls give_back on allocation failure#64521
Merged
webkit-commit-queue merged 1 commit intoMay 9, 2026
Conversation
Collaborator
|
EWS run on current version of this PR (hash e952e5a) Details |
Constellation
approved these changes
May 9, 2026
Member
Constellation
left a comment
There was a problem hiding this comment.
r=me
While pas_large_utility_free_heap_talks_to_large_sharing_pool is always true on the actual production environment, anyway, this is nice to fix!
…_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
e952e5a to
eccbe3f
Compare
Collaborator
|
Committed 312942@main (eccbe3f): https://commits.webkit.org/312942@main Reviewed commits have been landed. Closing PR #64521 and removing active labels. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
eccbe3f
e952e5a