Bug 21273
Summary: | Switching between custom allocators (TCmalloc, JEmalloc) in linux-qt | ||
---|---|---|---|
Product: | WebKit | Reporter: | Zoltan Horvath <zoltan> |
Component: | WebKit Qt | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | ||
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | Linux |
Zoltan Horvath
We modified build system of WebKit under linux-qt to use TCmalloc if “--tcmalloc” parameter is given to build-webkit script. Even more, we integrated JEmalloc into WebKit as well which is used if "--jemalloc" parameter is given to build-webkit script. (In Mozilla the default allocator is JEmalloc.)
If we do not give any of these parameters to the build these libraries are not used.
There are three patches:
(enable_tcmalloc.patch) enables TCmalloc in WebKit (without JEmalloc)
(enable_jemalloc.patch JEmalloc.h.patch JEmalloc.c.patch rb.h.patch) adds JEmalloc to WebKit (without enabling TCmalloc)
(enable_jetcmalloc.patch JEmalloc.h.patch JEmalloc.c.patch rb.h.patch) enables TCmalloc and adds JEmalloc at the same time (in this case the user can switch between the allocators in compile time)
Since under linux-qt global operator new and delete do not invoke allocators of TC/JEmalloc, therefore only fastMalloc invokes them. On the other hand, the experimental patches of bug #20422 (https://bugs.webkit.org/show_bug.cgi?id=20422) gives a solution where new and delete also invoke custom allocators (TC/JEmalloc).
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Zoltan Horvath
*** This bug has been marked as a duplicate of 21272 ***