diff options
author | Gregory P. Smith <greg@mad-scientist.com> | 2008-07-06 03:35:58 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@mad-scientist.com> | 2008-07-06 03:35:58 (GMT) |
commit | 2fe77060eb2b322da925b50ffe3c471258736cee (patch) | |
tree | 0966f7b98ec52c58f6c58cf42ec75237c72dda0b /Doc/library | |
parent | 17f2e4acb963268fe8b3c4e822f33d9372460607 (diff) | |
download | cpython-2fe77060eb2b322da925b50ffe3c471258736cee.zip cpython-2fe77060eb2b322da925b50ffe3c471258736cee.tar.gz cpython-2fe77060eb2b322da925b50ffe3c471258736cee.tar.bz2 |
- Issue #2862: Make int and float freelist management consistent with other
freelists. Changes their CompactFreeList apis into ClearFreeList apis and
calls them via gc.collect().
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/gc.rst | 6 | ||||
-rw-r--r-- | Doc/library/sys.rst | 16 |
2 files changed, 6 insertions, 16 deletions
diff --git a/Doc/library/gc.rst b/Doc/library/gc.rst index 70e4a6b..9ebbf06 100644 --- a/Doc/library/gc.rst +++ b/Doc/library/gc.rst @@ -47,6 +47,12 @@ The :mod:`gc` module provides the following functions: .. versionchanged:: 2.5 The optional *generation* argument was added. + .. versionchanged:: 2.6 + The free lists maintained for a number of builtin types are cleared + whenever a full collection or collection of the highest generation (2) + is run. Not all items in some free lists may be freed due to the + particular implementation, in particular :class:`int` and :class:`float`. + .. function:: set_debug(flags) diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index 2e39633..22397f2 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -58,22 +58,6 @@ always available. A string containing the copyright pertaining to the Python interpreter. -.. function:: _compact_freelists() - - Compact the free lists of integers and floats by deallocating unused blocks. - It can reduce the memory usage of the Python process several tenth of - thousands of integers or floats have been allocated at once. - - The return value is a tuple of tuples each containing three elements, - amount of used objects, total block count before the blocks are deallocated - and amount of freed blocks. The first tuple refers to ints, the second to - floats. - - This function should be used for specialized purposes only. - - .. versionadded:: 2.6 - - .. function:: _clear_type_cache() Clear the internal type cache. The type cache is used to speed up attribute |