[issue26530] tracemalloc: add C API to manually track/untrack memory allocations

Nathaniel Smith report at bugs.python.org
Fri Mar 18 12:58:58 EDT 2016


Nathaniel Smith added the comment:

There are other leakable resources besides heap and GPU memory -- shmem segments and file descriptors are two that I thought of earlier, but there are probably others too. (Note that not all file descriptors are associated with a python file object.) I guess one could hack most of these things into pointer bit tricks somehow, but I don't really see the appeal myself :-). It's fine for an internal implementation trick, but a very pythonic public api...

> Tracemalloc doesn't give access to pointers in its API, so it shouldn't matter.

This is actually a problem with this scheme... One would like to be able to get separate statistical reports for different resources.

Also, tracemalloc is awesome (really), but there are potentially other consumers of the hookable allocation scheme too that might choose to expose more or less information; we shouldn't forget about them entirely :-)

----------

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


More information about the Python-bugs-list mailing list