Bug 153325 - CGImageSource sometimes retains temporary SharedBuffer data indefinitely, doubling memory cost.
Summary: CGImageSource sometimes retains temporary SharedBuffer data indefinitely, dou...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords: Performance
Depends on:
Blocks:
 
Reported: 2016-01-21 14:40 PST by Andreas Kling
Modified: 2016-01-21 18:00 PST (History)
4 users (show)

See Also:


Attachments
Patch (4.77 KB, patch)
2016-01-21 14:41 PST, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.