[webkit-dev] Memory leaks in KJS

Josh Chia (谢任中) joshchia at gmail.com
Wed Sep 3 21:53:26 PDT 2008


Hi,

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.


There's another subgraph related to JS properties that is leaking 12MB:

KJS::PropertyMap::put->(KJS::PropertyMap::createTable,
KJS::PropertyMap::rehash)

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


More information about the webkit-dev mailing list