mirror of
https://github.com/python/cpython.git
synced 2025-10-21 14:12:27 +00:00
gh-111968: Use per-thread freelists for float in free-threading (gh-113886)
This commit is contained in:
parent
a0c9cf9456
commit
f728f7242c
9 changed files with 43 additions and 59 deletions
|
@ -15,7 +15,6 @@ void
|
|||
_PyGC_ClearAllFreeLists(PyInterpreterState *interp)
|
||||
{
|
||||
_PyTuple_ClearFreeList(interp);
|
||||
_PyFloat_ClearFreeList(interp);
|
||||
_PyDict_ClearFreeList(interp);
|
||||
_PyAsyncGen_ClearFreeLists(interp);
|
||||
_PyContext_ClearFreeList(interp);
|
||||
|
|
|
@ -12,7 +12,6 @@ void
|
|||
_PyGC_ClearAllFreeLists(PyInterpreterState *interp)
|
||||
{
|
||||
_PyTuple_ClearFreeList(interp);
|
||||
_PyFloat_ClearFreeList(interp);
|
||||
_PyDict_ClearFreeList(interp);
|
||||
_PyAsyncGen_ClearFreeLists(interp);
|
||||
_PyContext_ClearFreeList(interp);
|
||||
|
|
|
@ -1757,10 +1757,10 @@ finalize_interp_types(PyInterpreterState *interp)
|
|||
_PySlice_Fini(interp);
|
||||
|
||||
_PyUnicode_Fini(interp);
|
||||
_PyFloat_Fini(interp);
|
||||
|
||||
_PyFreeListState *state = _PyFreeListState_GET();
|
||||
_PyList_Fini(state);
|
||||
_PyFloat_Fini(state);
|
||||
|
||||
#ifdef Py_DEBUG
|
||||
_PyStaticObjects_CheckRefcnt(interp);
|
||||
|
|
|
@ -1458,6 +1458,7 @@ clear_datastack(PyThreadState *tstate)
|
|||
void
|
||||
_Py_ClearFreeLists(_PyFreeListState *state, int is_finalization)
|
||||
{
|
||||
_PyFloat_ClearFreeList(state, is_finalization);
|
||||
_PyList_ClearFreeList(state, is_finalization);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue