[Webkit-unassigned] [Bug 231917] [bmalloc] Heap.shrinkLarge() allocates non-aligned region

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 18 17:09:42 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=231917

--- Comment #1 from Basuke Suzuki <Basuke.Suzuki at sony.com> ---
Above description was wrong. Rewrote.

Because the newly allocated region is not aligned well, unaligned region will be returned to LargeFree while splitAndAllocate() is called. Those regions won't match to any request to LargeFree until the neighbor region is returned to LargeFree and get merged with that.

1. Align 40k memory region A. Both start and end is aligned in 4k boundary.
2. realloc A to 36k + 8. shrinkLarge tries to split it in that size, B (36k +8) and C (4k - 8)
3. B's end is not aligned, but there's no practical issue.
4. On the other hand, C's start address is not aligned and sit in the LargeFree. It won't fit to any request because it's not aligned.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211019/d821edb9/attachment.htm>


More information about the webkit-unassigned mailing list