[issue39061] Garbage Collection optimizations cause "memory leak"

Maxime Istasse report at bugs.python.org
Mon Dec 16 08:10:29 EST 2019


Maxime Istasse <istassem at gmail.com> added the comment:

TLDR; a short-lived object can make it directly from young generation to old generation if middle generation collection kicks in while it is not freeable yet. Old generation is very rarely collected. Several of those objects, if they imply cyclic references, can therefore stack there and use a lot of RAM if big objects are attached to them. (if no cyclic refs, refcount goes to 0 and everything is OK)

This seems to happen in 3.8 as well, most likely in old versions as well. To me, those conditions shouldn't be exceptional enough to be ignored. 
I'm beginning to work on a fix, no guarantee yet though...

----------
versions:  -Python 3.7

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


More information about the Python-bugs-list mailing list