bpo-43774: Remove unused PYMALLOC_DEBUG macro (GH-25711)

Enhance also the documentation of debug hooks on memory allocators.
This commit is contained in:
Victor Stinner 2021-04-29 10:47:47 +02:00 committed by GitHub
parent b1f413e6cf
commit 645ed62fb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 130 additions and 138 deletions

View file

@ -25,8 +25,8 @@ extern "C" {
heap used by the Python DLL; it could be a disaster if you free()'ed that
directly in your own extension. Using PyMem_Free instead ensures Python
can return the memory to the proper heap. As another example, in
PYMALLOC_DEBUG mode, Python wraps all calls to all PyMem_ and PyObject_
memory functions in special debugging wrappers that add additional
a debug build (Py_DEBUG macro), Python wraps all calls to all PyMem_ and
PyObject_ memory functions in special debugging wrappers that add additional
debugging info to dynamic memory blocks. The system routines have no idea
what to do with that stuff, and the Python wrappers have no idea what to do
with raw blocks obtained directly by the system routines then.