Bug 153325

Summary: CGImageSource sometimes retains temporary SharedBuffer data indefinitely, doubling memory cost.
Product: WebKit Reporter: Andreas Kling <kling>
Component: ImagesAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, japhet, koivisto
Priority: P2 Keywords: Performance
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Andreas Kling 2016-01-21 14:40:56 PST
When replacing the internal buffer of a SharedBuffer with mmap'ed file-backed pages, we may still have an ImageSource (inside of CachedImage::m_image) retaining the old heap-allocated resource buffer.
This means that we pay double the memory cost for encoded data in downloaded resources that get cached for the first time.
Comment 1 Andreas Kling 2016-01-21 14:41:35 PST
Created attachment 269495 [details]
Patch
Comment 2 WebKit Commit Bot 2016-01-21 18:00:53 PST
Comment on attachment 269495 [details]
Patch

Clearing flags on attachment: 269495

Committed r195430: <http://trac.webkit.org/changeset/195430>
Comment 3 WebKit Commit Bot 2016-01-21 18:00:57 PST
All reviewed patches have been landed.  Closing bug.