Akkana Peck did this:
setenv XPCOM_MEM_BLOAT_LOG 1
(typed a few characters, did Debug->Output HTML, then quit)
^D (to end the script)
We're leaking 1023 nsCSSSelectors and 12 CSSStyleSheetImpls.
Pierre, can you investigate.
[PTD team: we don't know the extent of the memory bloat due to this yet. We
just know it's unnecessary.]
Created attachment 2458 [details]
LEAK AND BLOAT STATISTICS: Win32 console output
The style leaks are the result of leaks at a higher level. As you can see in the
attached Win32 console output, we are leaking the following objects:
object total leaked
We don't have a clear owner for nsDocument or nsWebShell so I'm humbly submitting
this to beard who's got the best tools in the Valley to do that kind of work.
Changed the summary line to "leaking documents and webshells" from "leaking
nsCSSSelectors and CSSStyleSheetImpls".
*** Bug 17389 has been marked as a duplicate of this bug. ***
I don't see these same leaks, but I see others. Leak detection is a
Style person should follow up on these leaks. They are evidently shutdown leaks,
as they don't appear as transient leaks with the Boehm leak detector.
On Mac, just starting up and shutting down leaks these, which prevent the
nsIOService (and related services) from shutting down properly.
CSSLoaderImpl 18 5
CSSParserImpl 90 7
CSSStyleSheetImpl 92 91
CSSStyleSheetInner 54 53
...but I don't see the same problem on WindowsNT.
CCd attinasi. Gordon says that it only happens in the Mac but it may be related
to the other XP leaks that Marc has on his list.
Really CCd attinasi...
How come this is still on my list?
Trying for the 3rd time to reassign to attinasi...
This bug has been marked "future" because the original netscape engineer working
on this is over-burdened. If you feel this is an error, that you or another
known resource will be working on this bug,or if it blocks your work in some way
-- please attach your concern to the bug for reconsideration.
=> TK at AOL
reassigning to dbaron
I believe the fix I attached yesterday to bug 24645 should fix this bug. The
root of the leak was the XUL keybinding document table, which was intentionally
leaked to fix bug 27739. However, just releasing the table was not sufficient
because nobody was breaking the circular references between the keybinding
documents (nsXULDocument objects) and their script objects, which would explain
the state of this bug before. (Note that there were 3 XULDocumentImpl leaked in
pierre's original bloat log attached above. This is what I saw before breaking
the circular references.)
Proposed patch is:
Actually, this doesn't fix all the leaks when starting with mozilla -editor.
I'm working on this new leak. In fact, I'm writing a tutorial by writing down
exactly what I do to find it. It's going to be an interesting tutorial...
Part or all of the remaining leak has something to do with DocumentType objects
not having their script objects un-rooted when the
nsDocument::SetScriptGlobalObject(null) is called. This function needs to call
SetDocument on all the elements in mProlog and mEpilog instead of just on
mRootContent. Probably it needs to do the same elsewhere.
I'm not sure if that will fix the whole thing. There may be a problem with
Created attachment 11293 [details] [diff] [review]
patch to fix the "./mozilla -editor" startup leak
Created attachment 11614 [details] [diff] [review]
Created attachment 11801 [details] [diff] [review]
revised patch, cleaning up a bunch of other issues in the same file
Created attachment 11980 [details] [diff] [review]
Created attachment 12018 [details] [diff] [review]
a diff -uw (ignoring whitespace) of that patch "also needed"
I checked in the keybindings table / keybindings document part of the fix.
Was unable to check in due to cvs lock in layout/html/style/src. Will try again
Fix checked in, 2000-08-06 20:03 PDT.
*** Bug 42970 has been marked as a duplicate of this bug. ***
verified that the patches are in. Marking as such.
*** Bug 39855 has been marked as a duplicate of this bug. ***