[webkit-dev] Memory leaks in KJS

Geoffrey Garen ggaren at apple.com
Thu Sep 4 00:15:25 PDT 2008

> After rendering about 200 pages on my platform port of WebKit, I  
> seem to be seeing some memory leaks involving the code in KJS,  
> totalling 30-70MB.  I have included a subgraph of the call graph for  
> the leaking functions.  I'm not familiar with the KJS code.  Is it  
> possible that circular references between different types of nodes  
> are preventing their final destruction?  If not, what are some  
> possible causes I should investigate?
> WebCore::ScriptController::evaluate->KJS::Interpreter::evaluate- 
> >(KJS::Machine::execute, KJS::Parser::parse)
> KJS::Parser::parse->kjsyyparse->(KJS::FunctionBodyNode::create,  
> KJSLexerLex, makeFunctionCallNode, KJS::SourceElements::append)
> In kjsyyparse alone, it's leaking 34MB.

Incorrect reference counting in the parser usually occurs in cases  
like syntax errors. You might want to look into that. Another  
interesting test would be to see if the same bug reproduced on other  
ports, like the Windows or Mac ports.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.webkit.org/pipermail/webkit-dev/attachments/20080904/bac07069/attachment.html 

More information about the webkit-dev mailing list