RESOLVED FIXED 65445
JSC does a GC even when the heap still has free pages
https://bugs.webkit.org/show_bug.cgi?id=65445
Summary JSC does a GC even when the heap still has free pages
Filip Pizlo
Reported 2011-07-31 21:34:07 PDT
The JSC GC has an elastic notion of free memory, where free blocks left over from a previous garbage collection are steadily returned to the OS provided that the application does not experience a subsequent heap usage spike that would need those blocks again. But the GC does not leverage this as well as it could. It separately maintains a watermark limit for invoking collection. This limit is independent of the number of free pages. Thus, if an application experiences a memory usage peak where the heap is grown, and then memory usage dips resulting in a lower watermark, then the heap will be in the following awkward state: the free block pool will still have blocks available for immediate use in allocations, but the collector will insist on running anyway. Ideally, the elasticity of the free block pool should be coupled to the GC's decision function for when to invoke collection, so that we don't do full collections when there is still free memory available.
Attachments
the patch (4.60 KB, patch)
2011-07-31 21:53 PDT, Filip Pizlo
no flags
Filip Pizlo
Comment 1 2011-07-31 21:53:31 PDT
Created attachment 102476 [details] the patch
WebKit Review Bot
Comment 2 2011-08-02 12:57:20 PDT
Comment on attachment 102476 [details] the patch Clearing flags on attachment: 102476 Committed r92217: <http://trac.webkit.org/changeset/92217>
WebKit Review Bot
Comment 3 2011-08-02 12:57:24 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.