diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-04-12 19:54:06 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-12 19:54:06 (GMT) |
commit | e8f9acf03484c6c3f163f04a76321419369c28aa (patch) | |
tree | 5c93d50395353f1237d764203e87458fc8e54812 /Lib/test/test_capi.py | |
parent | 0fc91eef34a1d9194904fa093c9fbd711af0f26c (diff) | |
download | cpython-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 'Lib/test/test_capi.py')
-rw-r--r-- | Lib/test/test_capi.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py index 33c98ac..31dab6a 100644 --- a/Lib/test/test_capi.py +++ b/Lib/test/test_capi.py @@ -483,7 +483,7 @@ class PyMemDebugTests(unittest.TestCase): r" at tail\+1: 0xfd\n" r" at tail\+2: 0xfd\n" r" .*\n" - r" The block was made by call #[0-9]+ to debug malloc/realloc.\n" + r"( The block was made by call #[0-9]+ to debug malloc/realloc.\n)?" r" Data at p: cd cd cd .*\n" r"\n" r"Enable tracemalloc to get the memory block allocation traceback\n" @@ -499,7 +499,7 @@ class PyMemDebugTests(unittest.TestCase): r" 16 bytes originally requested\n" r" The [0-9] pad bytes at p-[0-9] are FORBIDDENBYTE, as expected.\n" r" The [0-9] pad bytes at tail={ptr} are FORBIDDENBYTE, as expected.\n" - r" The block was made by call #[0-9]+ to debug malloc/realloc.\n" + r"( The block was made by call #[0-9]+ to debug malloc/realloc.\n)?" r" Data at p: cd cd cd .*\n" r"\n" r"Enable tracemalloc to get the memory block allocation traceback\n" |