diff options
| author | Christian Heimes <christian@cheimes.de> | 2008-02-04 18:00:12 +0000 |
|---|---|---|
| committer | Christian Heimes <christian@cheimes.de> | 2008-02-04 18:00:12 +0000 |
| commit | 422051a3675271e179995ad4a0f056ff94395d55 (patch) | |
| tree | 3316e9503901082cc4beefbf169d8191c9838190 /Doc/c-api/int.rst | |
| parent | a26cf9b7609fc1c08fd1a69ddf5e44dc98a70dce (diff) | |
| download | cpython-git-422051a3675271e179995ad4a0f056ff94395d55.tar.gz | |
Patch #1953
I implemented the function sys._compact_freelists() and C API functions PyInt_/PyFloat_CompactFreeList() to compact the pre-allocated blocks of ints and floats. They allow the user to reduce the memory usage of a Python process that deals with lots of numbers.
The patch also renames sys._cleartypecache to sys._clear_type_cache
Diffstat (limited to 'Doc/c-api/int.rst')
| -rw-r--r-- | Doc/c-api/int.rst | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/c-api/int.rst b/Doc/c-api/int.rst index 526083b83b..94bf380ec3 100644 --- a/Doc/c-api/int.rst +++ b/Doc/c-api/int.rst @@ -120,3 +120,12 @@ Plain Integer Objects Return the system's idea of the largest integer it can handle (:const:`LONG_MAX`, as defined in the system header files). + + +.. cfunction:: void PyInt_CompactFreeList(size_t *bc, size_t *bf, size_t *sum) + + Compact the integer free list. *bc* is the number of allocated blocks before + blocks are freed, *bf* is the number of freed blocks and *sum* is the number + of remaining objects in the blocks. + + .. versionadded:: 2.6 |
