[Webkit-unassigned] [Bug 65661] New: JSC GC does not coalesce blocks during minor collections

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 3 20:03:25 PDT 2011


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

           Summary: JSC GC does not coalesce blocks during minor
                    collections
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: fpizlo at apple.com


The JSC GC uses a segregated-free list, big-bag-of-pages strategy, where separate pages (internally called blocks) are used for separate classes of object size.  Ordinarily, such a strategy implies that when a page (block in our case) becomes entirely vacant, it is disassociated with its size class so that any size class may use it.  This minimizes fragmentation, since it means that if an application changes its mind about what sizes to allocate then in the common case it will be able to reuse space previously used by the different sizes.  As well, this GC strategy also typically puts priority on filling in fragmented pages during early post-GC allocations, reverting to filling entirely-vacant pages only after the fragmented ones are fully occupied.  This can be thought of as a kind of best-fit, and in practice means that vacant pages are held in reserve for as long as possible in case the application changes its mind about what sizes to allocation late in the current mutatio
 n cycle.

The JSC GC uses exactly this strategy during full (eager-sweep) garbage collections.  But lazy-sweep collections - the ones triggered by heap exhaustion during allocation - do not do this.  They keep entirely-vacant blocks associated with whatever size class they were initialized for, and allocate into blocks in no particular order.  

The JSC GC should disassociate blocks from size classes when they become vacant, even on a lazy sweep garbage collection.

-- 
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