GitXplorerGitXplorer
v

pyfailmalloc

public
6 stars
1 forks
0 issues

Commits

List of commits on branch master.
Unverified
16c317782cebec3a49d6dcee1baefe2aecfefcd9

project moved to GitHub

vvstinner committed 5 years ago
Unverified
043e0733178210355fb1a4daf0823d8de3b28149

I removed http://pypi.python.org/pypi/pyfailmalloc

vvstinner committed 5 years ago
Unverified
439ec984e848b4f5fb748b1ab1815cf3926de590

No Maintenance Intended

vvstinner committed 7 years ago
Unverified
701f7b80ed3d5977b7f808ff0b0e88b043339003

haypo => vstinner

vvstinner committed 7 years ago
Unverified
4e626ad5332d395b2a1c1875d40829247bcb2f0d

update patch

vvstinner committed 9 years ago
Unverified
18bdc2354bd5dc4d8132a720b28d0a4b67d1b0d2

Update the patch for CPython 3.6

vvstinner committed 9 years ago

README

The README file for this repository.

++++++++++++ pyfailmalloc ++++++++++++

.. image:: http://unmaintained.tech/badge.svg :target: http://unmaintained.tech/ :alt: No Maintenance Intended

Debug tool for Python injecting memory allocation faults to simulate a low memory system to test how your application handles MemoryError exceptions.

pyfailmalloc is based on the PEP 445 <http://www.python.org/dev/peps/pep-0445/>_ "Add new APIs to customize Python memory allocators" and so requires at least Python 3.4.

  • pyfailmalloc project at GitHub (source code) <https://github.com/vstinner/pyfailmalloc>_

API

  • failmalloc.enable(range: int=1000): schedule a memory allocation failure in random.randint(1, range) allocations.
  • failmalloc.disable(): cancel the scheduled memory allocation failure

The version can be read from failmalloc.version as a string (ex: "0.1").

Changelog

Version 0.2 (2015-01-27)

  • Support Python 3.5: hook also calloc(), support the new PyMemAllocatorEx API
  • Add tox.ini to run tests using tox

Version 0.1 (2013-07-08)

  • First public version

See also

  • failmalloc <http://www.nongnu.org/failmalloc/>_
  • pytracemalloc <http://pypi.python.org/pypi/pytracemalloc>_