[Webkit-unassigned] [Bug 69913] New: Use realloc() to expand/shrink StringBuilder buffer

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 12 01:26:39 PDT 2011


           Summary: Use realloc() to expand/shrink StringBuilder buffer
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Web Template Framework
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: wangxianzhu at chromium.org
                CC: darin at apple.com

For now StringBuilder uses malloc(StringImpl::createUninitialized()) and memcpy to expand and shrink buffers. I found that replace them with realloc() can reduce many unnecessary actual allocations and copies. Experiments showed that where realloc() is applicable, 45.3% of realloc()s return the same pointer as the input i.e. no actual copies.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list