summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-04-12 19:54:06 (GMT)
committerGitHub <noreply@github.com>2019-04-12 19:54:06 (GMT)
commite8f9acf03484c6c3f163f04a76321419369c28aa (patch)
tree5c93d50395353f1237d764203e87458fc8e54812 /Misc
parent0fc91eef34a1d9194904fa093c9fbd711af0f26c (diff)
downloadcpython-e8f9acf03484c6c3f163f04a76321419369c28aa.zip
cpython-e8f9acf03484c6c3f163f04a76321419369c28aa.tar.gz
cpython-e8f9acf03484c6c3f163f04a76321419369c28aa.tar.bz2
bpo-36611: Disable serialno field of debug memory allocators (#12796)
Omit serialno field from debug hooks on Python memory allocators to reduce the memory footprint by 5%. Enable tracemalloc to get the traceback where a memory block has been allocated when a fatal memory error is logged to decide where to put a breakpoint. Compile Python with PYMEM_DEBUG_SERIALNO defined to get back the field.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Core and Builtins/2019-04-12-12-32-39.bpo-36611.zbo9WQ.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2019-04-12-12-32-39.bpo-36611.zbo9WQ.rst b/Misc/NEWS.d/next/Core and Builtins/2019-04-12-12-32-39.bpo-36611.zbo9WQ.rst
new file mode 100644
index 0000000..f55a9ef
--- /dev/null
+++ b/Misc/NEWS.d/next/Core and Builtins/2019-04-12-12-32-39.bpo-36611.zbo9WQ.rst
@@ -0,0 +1,5 @@
+Debug memory allocators: disable serialno field by default from debug hooks on
+Python memory allocators to reduce the memory footprint by 5%. Enable
+:mod:`tracemalloc` to get the traceback where a memory block has been allocated
+when a fatal memory error is logged to decide where to put a breakpoint.
+Compile Python with ``PYMEM_DEBUG_SERIALNO`` defined to get back the field.