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

STINNER Victor report at bugs.python.org
Mon Oct 7 02:51:05 CEST 2013


STINNER Victor added the comment:

ec121a72e848.patch:

- ignore changes on Lib/test/support/__init__.py: it's my own fix for issue #18948 which will be fixed differently
- ignore changes on Lib/test/regrtest.py: they should not be commited, it's just a convinient way to test tracemalloc (python -X tracemalloc -m test -r)
- changes on Modules/readline.c: this is the fix for the issue #16742
- Objects/codeobject.c: calling PyUnicode_READY(filename) in PyCode_New() is useful on Windows in debug mode, the filename may not be ready, whereas tracemalloc requires a ready Unicode string. This change can probably be fixed in default independently
- Objects/obmalloc.c: changes on _PyMem_Debug  and changes replacing PyMem_Malloc() with PyMem_RawMalloc() are a try to reuse pymalloc allocator for PyMem_Malloc(). This should be discussed independently

Sorry for all these unrelated change, I will try to cleanup the repository in the next patch.

----------

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


More information about the Python-bugs-list mailing list