mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
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
This commit is contained in:
parent
a26cf9b760
commit
422051a367
11 changed files with 160 additions and 42 deletions
|
@ -101,6 +101,8 @@ PyAPI_FUNC(void) _PyFloat_DigitsInit(void);
|
|||
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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue