/
githubmirror
/
cpython
Обзор
Документация
Войти
/
githubmirror
/
cpython
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v3.15.0rc1
Python/gc_gil.c
17 строк
488 B
Sam Gross
gh-100240: Use a consistent implementation for freelists (#121934)
22 июл 2024, 19:08
Не верифицирован
22 июл 2024, 19:08
5716cc3
Код
Авторство
О чём код?
#include "Python.h" #include "pycore_freelist.h" // _PyObject_ClearFreeLists() #ifndef Py_GIL_DISABLED /* Clear all free lists * All free lists are cleared during the collection of the highest generation. * Allocated items in the free list may keep a pymalloc arena occupied. * Clearing the free lists may give back memory to the OS earlier. */ void _PyGC_ClearAllFreeLists(PyInterpreterState *interp) { _PyObject_ClearFreeLists(&interp->object_state.freelists, 0); } #endif