diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-04-11 11:01:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-11 11:01:15 (GMT) |
commit | 4c409beb4c360a73d054f37807d3daad58d1b567 (patch) | |
tree | 03e835b35a2c910cd4793106eee2004212644746 /Doc | |
parent | 536a35b3f14888999f1ffa5be7239d0c26b73d7a (diff) | |
download | cpython-4c409beb4c360a73d054f37807d3daad58d1b567.zip cpython-4c409beb4c360a73d054f37807d3daad58d1b567.tar.gz cpython-4c409beb4c360a73d054f37807d3daad58d1b567.tar.bz2 |
bpo-36389: Change PyMem_SetupDebugHooks() constants (GH-12782)
Modify CLEANBYTE, DEADDYTE and FORBIDDENBYTE constants: use 0xCD,
0xDD and 0xFD, rather than 0xCB, 0xBB and 0xFB, to use the same byte
patterns than Windows CRT debug malloc() and free().
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/c-api/memory.rst | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Doc/c-api/memory.rst b/Doc/c-api/memory.rst index b79b7e4..65a2076 100644 --- a/Doc/c-api/memory.rst +++ b/Doc/c-api/memory.rst @@ -440,8 +440,9 @@ Customize Memory Allocators Setup hooks to detect bugs in the Python memory allocator functions. - Newly allocated memory is filled with the byte ``0xCB``, freed memory is - filled with the byte ``0xDB``. + Newly allocated memory is filled with the byte ``0xCD`` (``CLEANBYTE``), + freed memory is filled with the byte ``0xDD`` (``DEADBYTE``). Memory blocks + are surrounded by "forbidden bytes" (``FORBIDDENBYTE``: byte ``0xFD``). Runtime checks: @@ -471,6 +472,12 @@ Customize Memory Allocators if the GIL is held when functions of :c:data:`PYMEM_DOMAIN_OBJ` and :c:data:`PYMEM_DOMAIN_MEM` domains are called. + .. versionchanged:: 3.8.0 + Byte patterns ``0xCB`` (``CLEANBYTE``), ``0xDB`` (``DEADBYTE``) and + ``0xFB`` (``FORBIDDENBYTE``) have been replaced with ``0xCD``, ``0xDD`` + and ``0xFD`` to use the same values than Windows CRT debug ``malloc()`` + and ``free()``. + .. _pymalloc: |