Mercurial > cpython-lru_cache-weakref
diff Include/floatobject.h @ 45143:8fdd6d62ea55 legacy-trunk
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
| author | Christian Heimes <christian@cheimes.de> |
|---|---|
| date | Mon, 04 Feb 2008 18:00:12 +0000 |
| parents | 26384b8180c7 |
| children | 5bc7b20dc04a |
line wrap: on
line diff
--- a/Include/floatobject.h Mon Feb 04 01:04:35 2008 +0000 +++ b/Include/floatobject.h Mon Feb 04 18:00:12 2008 +0000 @@ -101,6 +101,8 @@ PyAPI_FUNC(double) _PyFloat_Unpack4(const unsigned char *p, int le); PyAPI_FUNC(double) _PyFloat_Unpack8(const unsigned char *p, int le); +/* free list api */ +PyAPI_FUNC(void) PyFloat_CompactFreeList(size_t *, size_t *, size_t *); #ifdef __cplusplus }
