The effect of TCmalloc in the QtWebKit port - stage 2: Memory consumption

As I mentioned, there is a reverse of a medal, so now let's see how enabling TCmalloc on the QtWebKit port's JavaScriptCore engine effects memory consumption.

Results for x86

We can see the memory consumption results of QtWebKit on x86-Linux (with JIT) in kilobytes in the following table:


QtWebKit x86-Linux
System malloc TCmalloc Difference
12 162 kB
15 209 kB
~25.05% hungrier
139 513 kB
140 270 kB
~0.54% hungrier
34 046 kB
40 528 kB
~19.03% hungrier


12 162 kB -> 15 209 kB
+ 3 047 kB
~25.05% hungrier

139 513 kB -> 140 270 kB
+ 757 kB
~0.54% hungrier

34 046 kB -> 40 528 kB
+ 6 482 kB
~19.03% hungrier


As we can expect, TCmalloc eats more memory on all of the three benchmark suites than the system malloc. We have to pay the price for the achieved significant performance improvement with enabling it.


These results represents the memory consumption of the JavaScriptCore part of the WebKit only, so in the future maybe we should investigate the results for the whole WebKit. Moreover, we have several possibilities to try decreasing the memory consumption: tweaking the parameters of TCmalloc, turning off TCmalloc :-) and trying out other allocators.

zecke (not verified) - 11/01/2009 - 08:32

You should describe how you are measuring memory usage and define "eating" memory.

zoltan.horvath - 11/03/2009 - 09:06

We measure the memory consumption (maximum resident set size) through the kernel's getrusage struct (we've a modified Linux kernel). This solution is similar to using the FreeBSD's /usr/bin/time command or the getrusage struct.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • No HTML tags allowed
  • Lines and paragraphs break automatically.

More information about formatting options

This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Fill in the blank