[issue31558] gc.freeze() - an API to mark objects as uncollectable

INADA Naoki report at bugs.python.org
Sun Sep 24 03:51:31 EDT 2017


INADA Naoki added the comment:

AFAIK, Python shutdown process calls full GC.

Don't touching permanent generation makes shutdown faster.
On the other hand, there are some downside:

* Some object may be not freed while shutdown.  It looks like "leak" for application embedding Python interpreter.
* Some __del__ methods may be not be called.

Of course, GC permanent generation while shutdown doesn't make sense.
gc.freeze() is used for sharing more memory pages.  Shutdown process
shouldn't unshare them.

So I think these notable downside should be documented.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31558>
_______________________________________


More information about the Python-bugs-list mailing list