[webkit-dev] Regarding cache memory leaks

Zaheer Ahmad zaheer.mot at gmail.com
Mon Oct 18 22:52:06 PDT 2010


On Wed, Oct 13, 2010 at 9:00 PM, <sumanrapolu at aim.com> wrote:

>  Hi Holger,
>
>   When we use the default cache model i.e 8MB cache size in this case it
> is storing the images beyond the 8MB that is untill complete RAM memory.
>
How much memory do you have on your system. AFAICT, webkit would need ~80M
to work with most of the large web pages.

> So we disabled the cache by using WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER  even
> though the images and JS are storing in the Cache. We observed this by
> printing dumpStats output.
>
Everything loaded in the current page gets to the cache first. The cache
limit applies to pages other than the current page. Try loading a large page
followed by a blank page and see if the cache limit is exceeded.

>
> Can you please suggest us how to disable the cache properly ?
>
you can disable it (Cache.cpp -> m_disabled = true), but it will not solve
the above problem. If you have a limited RAM, you could devise other
techniques like disabling bigger image loads and other page content (flash),
 handling near OOM/estimating memory usage of a page and stopping loads.
check how other mobile browsers (opera mini, n95) behave with limited RAM
for large pages.
BTW are you using a mobile user agent? that would solve some of the problems
with large pages, though not all.

>
>
> we are using webkit-1.2.3 and cross compiled for MIPS platform with
> gtk-directfb backend.
>
> Thanks In Advance.
>
> Thanks,
> Suman
>
>  -----Original Message-----
> From: webkit-dev-request <webkit-dev-request at lists.webkit.org>
> To: webkit-dev <webkit-dev at lists.webkit.org>
> Sent: Mon, 11 Oct 2010 7:30 pm
> Subject: webkit-dev Digest, Vol 65, Issue 12
>
>  Send webkit-dev mailing list submissions to
>
> 	webkit-dev at lists.webkit.org
>
>
> To subscribe or unsubscribe via the World Wide Web, visit
>
>
> 	http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
> or, via email, send a message with subject or body 'help' to
>
> 	webkit-dev-request at lists.webkit.org
>
>
> You can reach the person managing the list at
>
> 	webkit-dev-owner at lists.webkit.org
>
>
> When replying, please edit your Subject line so it is more specific
>
> than "Re: Contents of webkit-dev digest..."
>
>
>
> Today's Topics:
>
>
>    1. Regarding cache memory leaks (sumanrapolu at aim.com)
>
>    2. Re: Regarding cache memory leaks (Holger Freyther)
>
>    3. Tiger? (Adam Barth)
>
>
>
> ----------------------------------------------------------------------
>
>
> Message: 1
>
> Date: Sun, 10 Oct 2010 12:37:46 -0400 (EDT)
>
> From: sumanrapolu at aim.com
>
> To: webkit-dev at lists.webkit.org
>
> Subject: [webkit-dev] Regarding cache memory leaks
>
> Message-ID: <8CD36B09A73F4E9-1380-26E0C at Webmail-d112.sysops.aol.com>
>
> Content-Type: text/plain; charset="us-ascii"
>
>
>
> Dear All,
>
>
> We are working on webkitGtk ( with gtk-directfb backend )  and ported for MIPS
>
> platform. We observed there are memory leaks with PNG/JPG image rendering. I am
>
> using webkit-1.2.3 version and I set cache model to WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER.
>
>
> When I am printing the dumpStats I could able to see the Image count and live &&
>
> decoded image sizes. Even I disabled the cache it is storing on to cache.
>
> could you please suggest me is there any patch to avoid image related memory
>
> leaks with webkitGtk. Please help me on this.
>
>
> Thanks In Advance.
>
> -------------- next part --------------
>
> An HTML attachment was scrubbed...
>
> URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20101010/f451c9f4/attachment-0001.html>
>
>
> ------------------------------
>
>
> Message: 2
>
> Date: Sun, 10 Oct 2010 19:07:25 +0200
>
> From: Holger Freyther <zecke at selfish.org>
>
> To: webkit-dev at lists.webkit.org
>
> Subject: Re: [webkit-dev] Regarding cache memory leaks
>
> Message-ID: <4CB1F2CD.4050000 at selfish.org>
>
> Content-Type: text/plain; charset=ISO-8859-1
>
>
>
> On 10/10/2010 06:37 PM, sumanrapolu at aim.com wrote:
>
> > Dear All,
>
>
> > When I am printing the dumpStats I could able to see the Image count and live
>
> > && decoded image sizes. Even I disabled the cache it is storing on to cache.
>
> > could you please suggest me is there any patch to avoid image related memory
>
> > leaks with webkitGtk. Please help me on this.
>
>
> How do you know it is leaked? If you are currently viewing these images you
>
> will most likely have the encoded and decoded version around. Do you have a
>
> test case to show the memory leak?
>
>
>
> ------------------------------
>
>
> Message: 3
>
> Date: Mon, 11 Oct 2010 01:26:34 -0700
>
> From: Adam Barth <abarth at webkit.org>
>
> To: webkit-dev at lists.webkit.org
>
> Subject: [webkit-dev] Tiger?
>
> Message-ID:
>
> 	<AANLkTi=_tTwa60S5oaMotjuU8qd3M4nJQ00EJ2KRK8tA at mail.gmail.com>
>
> Content-Type: text/plain; charset=ISO-8859-1
>
>
> I don't see a Tiger buildbot anymore.  Does that mean I'm allowed to
>
> break the Tiger build?  If so, can we rip out all the Tiger-specific
>
> code?
>
>
> Adam
>
>
>
> ------------------------------
>
>
>
> _______________________________________________
>
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
>
>
> End of webkit-dev Digest, Vol 65, Issue 12
>
> ******************************************
>
>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20101019/ca682d61/attachment.html>


More information about the webkit-dev mailing list