gh-111968: Use per-thread slice_cache in free-threading (gh-113972)

This commit is contained in:
Donghee Na 2024-01-16 00:38:57 +09:00 committed by GitHub
parent 44e47dfba5
commit 3eae76554b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 28 additions and 18 deletions

View file

@ -1549,6 +1549,7 @@ PyThreadState_Clear(PyThreadState *tstate)
// Each thread should clear own freelists in free-threading builds.
_PyFreeListState *freelist_state = &((_PyThreadStateImpl*)tstate)->freelist_state;
_Py_ClearFreeLists(freelist_state, 0);
_PySlice_ClearCache(freelist_state);
#endif
_PyThreadState_ClearMimallocHeaps(tstate);