Comment #4 on issue 2077 by [email protected]: The scavenger GC does not collect independent DOM objects
http://code.google.com/p/v8/issues/detail?id=2077

Providing some context:

Currently, _all_ DOM objects are promoted to the old space and collected by the mark & sweep GC (since the scavenger GC ignores the objects that are not independent). This is a problem in terms of performance and memory. We want to have the scavenger GC collect DOM objects.

That being said, the work is not so trivial. The scavenger GC cannot call gcPrologue() in the V8 binding, because gcPrologue() is heavy (it needs to scan all DOM objects). In other words, the scavenger GC needs to run without the knowledge of object groups. Thus, if the scavenger GC simply calls back weakNodeCallback() for PENDING DOM objects and then weakNodeCallback() disposes the DOM object, it will delete DOM objects that are still alive in the DOM tree.

To solve the issue, we are thinking of making a change on weakNodeCallback() so that it does not dispose DOM objects that might be still alive in the DOM tree. Specifically, weakNodeCallback() can call Dispose() only for the DOM objects that no longer exist in the DOM tree. Otherwise, weakNodeCallback() calls MakeWeak() to resurrect DOM objects.


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to