Tim Peters <t...@python.org> added the comment:

Just noting that check_garbage() currently only determines which trash objects 
are now directly reachable from outside.  To be usable for the intended 
purpose, it would need to go on to compute which trash objects are reachable 
from those too.

Maybe a new function

static void
deduce_unreachable(PyGC_Head *base, PyGC_Head *unreachable)

that packaged the steps through move_unreachable().  The main function would 
use that on `young`, and check_garbage() on `unreachable` to find the _still_ 
unreachable objects.

I don't care about the expense.  Outside of zleak.py, the number of unreachable 
objects is usually small, so it's usually cheap to make another pass over just 
them.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38379>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to