[webkit-dev] XMLHttpRequest memoryleak

Mike Marchywka marchywka at hotmail.com
Wed Jun 2 07:06:51 PDT 2010

> Date: Wed, 2 Jun 2010 15:55:03 +0200
> From: paroga at paroga.com
> To: webkit-dev at lists.webkit.org
> Subject: [webkit-dev] XMLHttpRequest memoryleak
> Hi,
> I think WebKit (with JSC) leaks memory for every XMLHttpRequest and I need
> to fix this problem.
> Can somebody give me a hint where I should start?

I haven't looked at this issue or many code details but on an intial
look and some test builds, it seems ref counted smart pointers
are used everywhere.  Coming from java I can understand the attraction
but they don't just automtically fix anything. Indeed, I spend
more time waiting for VM thrashing in firexfox and icwesel
than I do surfing sometimes as memory usage creeps up.

I guess I would ask if you can empirically relate your test pages
to a memory leak- can you say that simple html lacking javascript
is leak free? Can you generally isolate the leak to JS?

Now the problem with a memory leak,long before you run out of
memory, is performance. Can you or do you have any info on page faults?
I guess you expect these to happen but I'm seeing stuff that looks like thrashing,
it isn't like all the stale stuff if on a page that just gets swapped out and


> My testpage (http://paroga.com/webkit/memory.htm) only creates a request
> every second.
> Safari on windows "leaks" about 60KB/minute. QtBrowser on WinCE needs
> about 4KB/minute.
> I don't think that my values are correct, because of the garbage
> collector.
> Is there any easy way to dump a list of all used javascript objects (and
> references)?
> Can I trigger the GarbageCollecter manually to get the real memory usage?
> Maybe related bugs:
> https://bugs.webkit.org/show_bug.cgi?id=17534
> https://bugs.webkit.org/show_bug.cgi?id=27041
> - Patrick
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail. 

More information about the webkit-dev mailing list