summaryrefslogtreecommitdiff
path: root/Doc/c-api/memory.rst
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-03-18 11:04:31 +0100
committerVictor Stinner <victor.stinner@gmail.com>2016-03-18 11:04:31 +0100
commita4cd8040a48df6d07017603ee0604ad85198761a (patch)
tree9b4b28fb90c0599769d88ce6f22364b36f171dc9 /Doc/c-api/memory.rst
parent4b4d5387410bfce6964023e8130f1bd98bba8426 (diff)
downloadcpython-a4cd8040a48df6d07017603ee0604ad85198761a.tar.gz
Enhance documentation on malloc debug hooks
Issue #26564, #26516, #26563.
Diffstat (limited to 'Doc/c-api/memory.rst')
-rw-r--r--Doc/c-api/memory.rst9
1 files changed, 6 insertions, 3 deletions
diff --git a/Doc/c-api/memory.rst b/Doc/c-api/memory.rst
index 843ccac443..1787292480 100644
--- a/Doc/c-api/memory.rst
+++ b/Doc/c-api/memory.rst
@@ -346,8 +346,9 @@ Customize Memory Allocators
- 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
+ allocator 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
On error, the debug hooks use the :mod:`tracemalloc` module to get the
traceback where a memory block was allocated. The traceback is only
@@ -361,7 +362,9 @@ Customize Memory Allocators
.. versionchanged:: 3.6
This function now also works on Python compiled in release mode.
On error, the debug hooks now use :mod:`tracemalloc` to get the traceback
- where a memory block was allocated.
+ where a memory block was allocated. The debug hooks now also check
+ if the GIL is hold when functions of :c:data:`PYMEM_DOMAIN_OBJ` and
+ :c:data:`PYMEM_DOMAIN_MEM` domains are called.
.. _pymalloc: