[3.7] bpo-36389: _PyObject_IsFreed() now also detects uninitialized memory (GH-12770) by vstinner · Pull Request #12780 · python/cpython
…H-12770) Rename _PyMem_IsFreed() function to _PyMem_IsPtrFreed(). The function is now way more efficient, it became a simple comparison on integers, rather than a short loop. It detects also uninitialized bytes and "forbidden bytes" filled by debug hooks on memory allocators. Add unit tests on _PyObject_IsFreed(). (cherry picked from commit 2b00db6)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters