Enhance documentation on malloc debug hooks

Issue #26564, #26516, #26563.
This commit is contained in:
Victor Stinner 2016-03-18 11:04:31 +01:00
parent 3ca3342307
commit c2fc56836f
3 changed files with 20 additions and 11 deletions

View file

@ -118,8 +118,10 @@ compiled in release mode using ``PYTHONMALLOC=debug``. Effects of debug hooks:
* Detect write before the start of the buffer (buffer underflow)
* Detect write after the end of the buffer (buffer overflow)
* Check that the :term:`GIL <global interpreter lock>` is held when allocator
functions of the :c:data:`PYMEM_DOMAIN_OBJ` domain (ex:
:c:func:`PyObject_Malloc`) are called
functions of :c:data:`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) and
:c:data:`PYMEM_DOMAIN_MEM` (ex: :c:func:`PyMem_Malloc`) domains are called.
Checking if the GIL is hold is also a new feature of Python 3.6.
See the :c:func:`PyMem_SetupDebugHooks` function for debug hooks on Python
memory allocators.