[Python-Dev] pyfailmalloc: new debug tool to test how your applications handles MemoryError

Victor Stinner victor.stinner at gmail.com
Tue Jul 9 01:41:23 CEST 2013


2013/7/9 Victor Stinner <victor.stinner at gmail.com>:
> I developed a small Python module (150 lines of C code) to inject
> memory allocation failures:
> https://pypi.python.org/pypi/pyfailmalloc

Bitbucket was down, so I was unable to give the link to its source
code. The server is back, here is the C code:
https://bitbucket.org/haypo/pyfailmalloc/src/tip/failmalloc.c

You can see that it's now easy to develop such tools thanks to the PEP 445.

Victor


More information about the Python-Dev mailing list