STINNER Victor added the comment: More complete patch (version 2):
* Document PYTHONMALLOC environment variable * Add PYTHONMALLOC=debug to install debug hooks without forcing a specific memory allocator (keep the default memory allocator) * Fix sys._debugmallocstats() for PYTHONMALLOC=malloc: don't display pymalloc stats * _testcapi.pymem_api_misuse(): more realistic code, use PyMem_Mallloc() + PyMem_RawFree(). This code works in release mode (since PyMem and PyMem_Raw use the same allocator: malloc/free), but fail with a fatal error with debug hooks (API misused). ---------- Added file: http://bugs.python.org/file42102/pymem-2.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26516> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com