On 03/06/2008, at 19:58, Paul Pedriana wrote:

As I have mentioned recently on this list, I am investigating the
possibility of porting WebKit to work within games on gaming platforms.
Recent help on this has been greatly appreciated and I am going to try
to stick with WebKit as opposed to Mozilla/Gecko.

A major consideration for the usage of libraries in general on gaming
and embedded platforms is that their memory usage be controllable. The
application should be able to set aside a block of RAM and have the
library use that block of RAM via a user-supplied memory allocator. At
no time should the library attempt to use any other memory nor use its
own means to access the user-provided memory. This pattern of library
development is very important, and most professional commercial library
software follows this pattern (including all commercial peers of
WebKit). I am wondering how I might achieve this with WebKit.

WebKit uses a derivative of Google's high-performance Thread Caching Malloc (<http://google-perftools.googlecode.com/svn/trunk/doc/tcmalloc.html >) for the majority of allocations. We've tuned the allocator to add further performance gains over the system allocators on Mac and Windows, and have recently made further improvements to ensure unused memory is returned to the system. Within JavaScriptCore and WebCore we overload "operator new" and "operator delete" in terms of our "fastMalloc" and "fastFree" functions to ensure all C++ object allocations go via this allocator (<http://trac.webkit.org/browser/trunk/JavaScriptCore/wtf/FastMalloc.h >). The few direct calls to "malloc" and "free" within JavaScriptCore and WebCore are also made via our wrapper functions. This should make it straightforward to substitute your own custom allocator in place of WebKit's if it would better suit your target environment.

Kind regards,

Mark Rowe

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to