Hi,

I am using WebCore::gcController().discardAllCompiledCode() API to discard 
cached scripts and free up memory. This works pretty well in the JIT mode. 
However, when I used C Loop interpreter, the cached scripts are not discarded. 
So far, I have traced it down to JSC::SourceCode::m_provider member. The ref 
count on this member is all wrong.

The reproduction is pretty simple. Load a "hello world" type page in web view, 
then go to Google.com. That causes about 0.189 MB worth of scripts to get 
cached. Go back to the hello world page and now call 
WebCore::gcController().discardAllCompiledCode(). The JIT path is able to get 
rid of the cached scripts. However, C loop interpreter leaks pretty much 
everything (the ref count on the member noted about is around ~850 whereas it 
should be 1). The direct url of the problematic script is 
http://www.google.com/xjs/_/js/k=xjs.hp.en_US.75bv2nh_qxI.O/m=sb_he,pcc/rt=j/d=1/sv=1/rs=AItRSTOX5WMsAVpkgEafYeVKZ7ZCJdNXcg

An even more accessible scenario is just keep on reloading the sunspider test 
suite. I used 0.9.1 - 
http://www.webkit.org/perf/sunspider-0.9.1/sunspider-0.9.1/driver.html Every 
reload is pretty much leaking causing the memory usage to grow unbounded. The C 
Loop interpreter path memory usage goes up to 200 MB just within few minutes 
however the JIT path stays around 12 MB.

My version of code is about 5 months old (157437). However, I did not see any 
leak fixes going in recently when I search bugzilla.

Any help is appreciated.

Thanks
Arpit


_______________________________________________
webkit-help mailing list
webkit-help@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-help

Reply via email to