[Python-Dev] Discussion related to memory leaks requested (original) (raw)

Brett Cannon brett at python.org
Wed Jan 13 15:06:11 EST 2016


Probably the best way to handle this, Matthew, is to open issues at bugs.python.org for each of the leaks you have found and then they can be discussed there.

And thanks for being willing to report these!

On Wed, 13 Jan 2016 at 11:42 Matthew Paulson <paulson at busiq.com> wrote:

Hi:

I've spent some time performing memory leak analysis while using Python in an embedded configuration. The pattern is: PyInitialize(); ... run empty python source file ... PyFinalize();

I've identified several suspect areas including dictionary maitenace in import.c:~ 414 /* Clear the modules dict. */ PyDictClear(modules); /* Restore the original builtins dict, to ensure that any user data gets cleared. */ dict = PyDictCopy(interp->builtins); if (dict == NULL) PyErrClear(); PyDictClear(interp->builtins); if (PyDictUpdate(interp->builtins, interp->builtinscopy)) PyErrClear(); PyXDECREF(dict); /* Clear module dict copies stored in the interpreter state */ Is there someone in the group that would like to discuss this topic. There seems to be other leaks as well. I'm new to Python-dev, but willing to help or work with someone who is more familiar with these areas than I. Thanks, Matt --


Python-Dev mailing list Python-Dev at python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/brett%40python.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20160113/172001b8/attachment-0001.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: MattSig.JPG Type: image/jpeg Size: 38491 bytes Desc: not available URL: <http://mail.python.org/pipermail/python-dev/attachments/20160113/172001b8/attachment-0002.jpe> -------------- next part -------------- A non-text attachment was scrubbed... Name: MattSig.JPG Type: image/jpeg Size: 38491 bytes Desc: not available URL: <http://mail.python.org/pipermail/python-dev/attachments/20160113/172001b8/attachment-0003.jpe>



More information about the Python-Dev mailing list