[Webkit-unassigned] [Bug 151817] New: bmalloc: extra large allocations could be more efficient

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Dec 3 12:29:56 PST 2015


            Bug ID: 151817
           Summary: bmalloc: extra large allocations could be more
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: msaboff at apple.com

BMalloc aligns extra large allocations to start on super chunk size aligned addresses.  It does this by increasing the allocation size to be at least two super chunks and then deallocating the front and back memory to get the start address to be super chunk aligned.  Given that the super chunk size is 4MB, we always ask the OS for 8MB for allocations 2MB or more and return the unused.  It makes sense to reduce the super chunk size to 2MB.

Secondly, when realloc is called on an extra large allocated piece of memory, we always allocate new memory and memcpy from the old.  There is a good possibility that we can get the memory for the increase from adjacently allocated memory, thus saving having both region allocated at once and the memcpy.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151203/b90bcd5b/attachment.html>

More information about the webkit-unassigned mailing list