[issue19816] test.regrtest: use tracemalloc to detect memory leaks?

STINNER Victor report at bugs.python.org
Thu Jul 10 22:30:56 CEST 2014


STINNER Victor added the comment:

> The problem is snapshots will by themselves create allocation noise: you cannot really use tracemalloc to detect leaks, only to diagnose the leaks you have detected.

It's trivial to ignore allocations done in the tracemalloc module. My work-in-progress patch uses for example these filters:

tracemalloc_filters = [
   tracemalloc.Filter(False, '<frozen importlib._bootstrap>', all_frames=True),
   tracemalloc.Filter(False, tracemalloc.__file__, all_frames=True),
]

----------

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


More information about the Python-bugs-list mailing list