[issue18874] Add a new tracemalloc module to trace memory allocations

Raymond Hettinger report at bugs.python.org
Sun Oct 6 09:42:29 CEST 2013


Raymond Hettinger added the comment:

I recommend that tracemalloc focus exclusively on real allocations and ignore freelisting.   The former are interesting because they directly affect performance.  Freelists on the other hand are close to being free (as in beer).

Measuring the freelist usage (or disabling it and then measuring) makes the proposal more complex than necessary and doesn't provide useful information (freelisting is no more interesting to track than saving a value in a static variable).

Another suggestion is to expand the API to provide a way to identify a potential performance killer:  the number of reallocs() than result in a new pointer (because the data moved).

If you use hash table code from another project, be sure to check its licensing.

----------
nosy: +rhettinger

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


More information about the Python-bugs-list mailing list