[issue19831] tracemalloc: stop the module later

STINNER Victor report at bugs.python.org
Fri Nov 29 11:57:31 CET 2013


New submission from STINNER Victor:

tracemalloc cannot be used in object destructors because the module is stopped early at Python shutdown.

I would like to use tracemalloc.get_object_traceback() in object destructors to retrieve where an object was allocated.

Attached patch replaces the atexit handler with a builtin _PyTraceMalloc_Fini() function to stop tracemalloc much later. It does also simplify the C code of _tracemalloc.c.

----------
files: tracemalloc_fini.patch
keywords: patch
messages: 204717
nosy: haypo, neologix, pitrou
priority: normal
severity: normal
status: open
title: tracemalloc: stop the module later
versions: Python 3.4
Added file: http://bugs.python.org/file32887/tracemalloc_fini.patch

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


More information about the Python-bugs-list mailing list