[issue13390] Hunt memory allocations in addition to reference leaks

Antoine Pitrou report at bugs.python.org
Sun Nov 13 00:24:29 CET 2011


New submission from Antoine Pitrou <pitrou at free.fr>:

This patch adds a counting of the number of allocated memory blocks (through the PyObject_Malloc API). Together with -R, it can help chase those memory leaks which aren't reference leaks (see c6dafa2e2594).

The sys.getallocedblocks() function is also available in non-debug mode. This is meant to help 3rd party extension writers, who rarely have access to debug builds.

To avoid too many false positives, issue13389 is a prerequisite (at least for the "test -R" part of the patch). Even after it, there are still a couple "test -R" failures; we'd have to investigate them.

----------
components: Interpreter Core, Tests
files: debugblocks.patch
keywords: patch
messages: 147531
nosy: ncoghlan, pitrou, tim_one
priority: normal
severity: normal
stage: patch review
status: open
title: Hunt memory allocations in addition to reference leaks
type: resource usage
versions: Python 3.3
Added file: http://bugs.python.org/file23671/debugblocks.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13390>
_______________________________________


More information about the Python-bugs-list mailing list