[webkit-help] Webkit Memory Management

zaheer ahmad zaheer.mot at gmail.com
Wed Dec 30 23:11:39 PST 2009


hi, comments inline.
thanks,
Zaheer

On Wed, Dec 30, 2009 at 7:20 PM, <arya.saurabh at wipro.com> wrote:

>  Hi All,
>
>
>
> Request your suggestion on very basic memory management queries. Please
> bear with me.
>
>
>
> I observe that the current Webkit code uses both fastMalloc as well as
> system malloc to make allocations. I have following queries regarding the
> same:
>
>
>
> 1)       Is there some particular reason to continue using both fastMalloc
> and system malloc? Will there be any problem if all malloc’s are made to
> call fastMalloc for allocation?
>
The idea is to use fastMalloc for all memory requests from webkit library.
Allocations from other libraries in the application will use the system
malloc.

> 2)       Does fastMalloc, in its current form, provide enough memory
> optimization to be used in an embedded platform, or, is it still necessary
> to use custom memory allocation logic (like Nokia S60 does)?
>
The allocators (system malloc or fast malloc) are optimized general
allocators with space/perf tradeoffs. webkit requests as much memory is
required to load the page, so if you have a large page it would take more
memory. AFAIK, if you need a bounded memory usage you need to compromise the
content (e..g dropping large images, large js, etc), but i dont think there
is a sane way to define such a behavior. The practical way is to have a
reasonable amount of memory available to your application for normal user
browsing behavior (e.g. continously browsing ~100 pages). This is ofcourse
after you have removed any leaks/done platform specific optimizations in
memory usage.
You may refer to this thread -
https://lists.webkit.org/pipermail/webkit-dev/2008-June/004069.html

>
>
> Any help/suggestion on the above is highly appreciated.
>
>
>
> Thanks and Regards
>
> Arya
>
> * Please do not print this email unless it is absolutely necessary. *
>
> The information contained in this electronic message and any attachments to
> this message are intended for the exclusive use of the addressee(s) and may
> contain proprietary, confidential or privileged information. If you are not
> the intended recipient, you should not disseminate, distribute or copy this
> e-mail. Please notify the sender immediately and destroy all copies of this
> message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of viruses. The
> company accepts no liability for any damage caused by any virus transmitted
> by this email.
>
> www.wipro.com
>
> _______________________________________________
> webkit-help mailing list
> webkit-help at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-help
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20091231/b244a445/attachment.html>


More information about the webkit-help mailing list