diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-12-17 22:05:59 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-12-17 22:05:59 (GMT) |
commit | 928405303dfdb740e5b40815a0cfdb2da92f768d (patch) | |
tree | 1770f5a48cd9751873ecaba8d73981b19e094b57 /Doc/library/sys.rst | |
parent | 3438fa496db50ef3cafcfdb3243f2f769bc12ebe (diff) | |
download | cpython-928405303dfdb740e5b40815a0cfdb2da92f768d.zip cpython-928405303dfdb740e5b40815a0cfdb2da92f768d.tar.gz cpython-928405303dfdb740e5b40815a0cfdb2da92f768d.tar.bz2 |
Following issue #13390, fix compilation --without-pymalloc, and make sys.getallocatedblocks() return 0 in that situation.
Diffstat (limited to 'Doc/library/sys.rst')
-rw-r--r-- | Doc/library/sys.rst | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index ee1f2b2..a906cde 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -396,15 +396,16 @@ always available. .. function:: getallocatedblocks() Return the number of memory blocks currently allocated by the interpreter, - regardless of their size. This function is mainly useful for debugging - small memory leaks. Because of the interpreter's internal caches, the - result can vary from call to call; you may have to call - :func:`_clear_type_cache()` to get more predictable results. + regardless of their size. This function is mainly useful for tracking + and debugging memory leaks. Because of the interpreter's internal + caches, the result can vary from call to call; you may have to call + :func:`_clear_type_cache()` and :func:`gc.collect()` to get more + predictable results. - .. versionadded:: 3.4 + If a Python build or implementation cannot reasonably compute this + information, :func:`getallocatedblocks()` is allowed to return 0 instead. - .. impl-detail:: - Not all Python implementations may be able to return this information. + .. versionadded:: 3.4 .. function:: getcheckinterval() |