[webkit-dev] WTF::fastMalloc

Maciej Stachowiak mjs at apple.com
Wed Oct 2 11:00:52 PDT 2013

On Oct 2, 2013, at 1:17 AM, Konstantin Tokarev <annulen at yandex.ru> wrote:

> 02.10.2013, 03:18, "Zoltan Horvath" <zoltan at webkit.org>:
>> On Tue, Oct 1, 2013 at 3:52 PM, Geoffrey Garen <ggaren at apple.com> wrote:
>>>> So are you proposing to use the system allocator on Windows?
>>> I’m proposing a two step process:
>>> (1) Use the system allocator on Windows (and GTK).
>>> (2) If a port maintainer cares to optimize a given port, without too much disruption to mainline code, they may do so.
>>> FWIW, If I were conducting (2) for Windows, malloc would be pretty far down the list of things I started porting.
>>>> The current malloc logic has been the source of a number of mysterious crashes on Windows, so reverting to the system allocator might be a good thing for stability. I don’t know what the potential performance ramifications would be.
>>> Yes, I’ve heard that on other platforms as well.
>> This usually happens because the allocation/free mismatches. (In cases such as memory allocated by TCmalloc via the FastMalloc interface (fastMalloc, fastNewMalloc) and tried to be freed by the system free.)
> Out of curiosity, what's wrong with linking whole application using WebKit against tcmalloc or some other malloc implementation? This way it's possible to use optimized allocator without any source changes, and malloc/free mismatch cannot happen. Why FastMalloc API was needed at all?

We couldn't find a clean way to do this on Mac because some low-level frameworks make use of specific obscure features of the system allocator. But it may be viable on other platforms.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20131002/809ed2dc/attachment.html>

More information about the webkit-dev mailing list