[webkit-help] Possible memory leak or cache problem

john.kjellberg at power.alstom.com john.kjellberg at power.alstom.com
Thu Oct 1 04:29:05 PDT 2009


I wonder if some of you could  help me with this. The following request 
increases memory usage on each request:

<script type="text/javascript">
var xmlHttp=new XMLHttpRequest();

var i = 0;
function test() {
        xmlHttp.open("GET","mem_test.htm?" + (i++), false);


If i remove "i++" the memory usage is constant. Also valgrind reports no 
significant leaks. This leads me to beleve that it is cached somehow. 

I have tried the following:

// Disable forward/back list
list = webkit_web_view_get_back_forward_list(web_view);
gint limit = webkit_web_back_forward_list_get_limit(list);
webkit_web_back_forward_list_set_limit(list, 0);

// Disable caches
WebCore::cache()->setCapacities(0, 0, 0);

but it doesn't seem to help at all.

Is there anything else I should try?

It is really important that I get It to stop using memory even if it is 
cache since it makes it much more difficult to find real leaks. I'm quite 
sure that there is one since the system I'm running WebKit on stops 
working after a couple of days.

I'm using GTK WebKit  r48290 and GtkLauncher from subversion running on 

Thanks in advance

/ John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20091001/c1037b57/attachment-0001.html>

More information about the webkit-help mailing list