In a PYMALLOC_DEBUG build obmalloc adds extra debugging info
to each allocated block. This was using 4 bytes for each such
piece of info regardless of platform. This didn't really matter
before (proof: no bug reports, and the debug-build obmalloc would
have assert-failed if it was ever asked for a chunk of memory
>= 2**32 bytes), since container indices were plain ints. But after
the Py_ssize_t changes, it's at least theoretically possible to
allocate a list or string whose guts exceed 2**32 bytes, and the
PYMALLOC_DEBUG routines would fail then (having only 4 bytes
to record the originally requested size).
Now we use sizeof(size_t) bytes for each of a PYMALLOC_DEBUG
build's extra debugging fields. This won't make any difference
on 32-bit boxes, but will add 16 bytes to each allocation in
a debug build on a 64-bit box.
diff --git a/Misc/NEWS b/Misc/NEWS
index 8696784..088e245 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -464,7 +464,13 @@
Note: Codec packages should implement and register their own
codec search function. PEP 100 has the details.
-- PEP 353: Using ssize_t as the index type.
+- PEP 353: Using ``Py_ssize_t`` as the index type.
+
+- ``PYMALLOC_DEBUG`` builds now add ``4*sizeof(size_t)`` bytes of debugging
+ info to each allocated block, since the ``Py_ssize_t`` changes (PEP 353)
+ now allow Python to make use of memory blocks exceeding 2**32 bytes for
+ some purposes on 64-bit boxes. A ``PYMALLOC_DEBUG`` build was limited
+ to 4-byte allocations before.
- Patch #1400181, fix unicode string formatting to not use the locale.
This is how string objects work. u'%f' could use , instead of .