summaryrefslogtreecommitdiff
path: root/Doc/library/sys.rst
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2013-03-07 23:45:03 +1000
committerNick Coghlan <ncoghlan@gmail.com>2013-03-07 23:45:03 +1000
commit9ebe2227a63e674dd18f05dcc502522ed2cf027e (patch)
treec77e53e7d256ee14948b1748fc305d6aca3ccf8d /Doc/library/sys.rst
parentcd2c1e406a86f339dbbf27711ecc8d3174ee3585 (diff)
parentd7540f76f04869abaa51a3d446e127de20f9c8f4 (diff)
downloadcpython-9ebe2227a63e674dd18f05dcc502522ed2cf027e.tar.gz
Merge fix for #15465 from 3.3
Diffstat (limited to 'Doc/library/sys.rst')
-rw-r--r--Doc/library/sys.rst18
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 |
+------------------+---------------------------------------------------------+