diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2013-03-07 23:45:03 +1000 |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2013-03-07 23:45:03 +1000 |
commit | 9ebe2227a63e674dd18f05dcc502522ed2cf027e (patch) | |
tree | c77e53e7d256ee14948b1748fc305d6aca3ccf8d /Doc/library/sys.rst | |
parent | cd2c1e406a86f339dbbf27711ecc8d3174ee3585 (diff) | |
parent | d7540f76f04869abaa51a3d446e127de20f9c8f4 (diff) | |
download | cpython-9ebe2227a63e674dd18f05dcc502522ed2cf027e.tar.gz |
Merge fix for #15465 from 3.3
Diffstat (limited to 'Doc/library/sys.rst')
-rw-r--r-- | Doc/library/sys.rst | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index aad32d2bfb..f91a399829 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -378,6 +378,21 @@ always available. .. versionadded:: 3.1 +.. function:: getallocatedblocks() + + Return the number of memory blocks currently allocated by the interpreter, + 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. + + If a Python build or implementation cannot reasonably compute this + information, :func:`getallocatedblocks()` is allowed to return 0 instead. + + .. versionadded:: 3.4 + + .. function:: getcheckinterval() Return the interpreter's "check interval"; see :func:`setcheckinterval`. @@ -802,8 +817,6 @@ always available. Windows ``'win32'`` Windows/Cygwin ``'cygwin'`` Mac OS X ``'darwin'`` - OS/2 ``'os2'`` - OS/2 EMX ``'os2emx'`` ================ =========================== .. versionchanged:: 3.3 @@ -1082,7 +1095,6 @@ always available. | :const:`name` | Name of the thread implementation: | | | | | | * ``'nt'``: Windows threads | - | | * ``'os2'``: OS/2 threads | | | * ``'pthread'``: POSIX threads | | | * ``'solaris'``: Solaris threads | +------------------+---------------------------------------------------------+ |