[Webkit-unassigned] [Bug 224840] Crash due to VectorBuffer pre-allocation failure

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 21 14:12:05 PDT 2021


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

--- Comment #11 from Sam Weinig <sam at webkit.org> ---
(In reply to Darin Adler from comment #9)
> (In reply to Sam Weinig from comment #5)
> > Looks like the generic HashMap and HashSet decoders also do a reservation in
> > ArgumentCoders.h
> 
> Really!? That is not good. Let’s fix that. I hope there’s a way to do it
> without costing too much memory or performance.

I don't think the reservation is too likely to be that much of a win.

For avoid doing multiple allocations in the general case, we could pick a maximum value for reservations (maybe, 16 or something), and do the reservation if the size is at or below that.

For memory use we could add some sort of "shrinkToFix" for HashMap/HashSet, but we would probably be better off using the new RobinHoodHashMaps if we want to improve memory use.

-- 
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/20210421/1892c794/attachment.htm>


More information about the webkit-unassigned mailing list