mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-40521: Make dict free lists per-interpreter (GH-20645)
Each interpreter now has its own dict free list: * Move dict free lists into PyInterpreterState. * Move PyDict_MAXFREELIST define to pycore_interp.h * Add _Py_dict_state structure. * Add tstate parameter to _PyDict_ClearFreeList() and _PyDict_Fini(). * In debug mode, ensure that the dict free lists are not used after _PyDict_Fini() is called. * Remove "#ifdef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS".
This commit is contained in:
parent
26a1ad1c24
commit
b4e85cadfb
7 changed files with 102 additions and 85 deletions
|
@ -1038,7 +1038,7 @@ clear_freelists(PyThreadState *tstate)
|
|||
_PyTuple_ClearFreeList(tstate);
|
||||
_PyFloat_ClearFreeList(tstate);
|
||||
_PyList_ClearFreeList(tstate);
|
||||
_PyDict_ClearFreeList();
|
||||
_PyDict_ClearFreeList(tstate);
|
||||
_PyAsyncGen_ClearFreeLists(tstate);
|
||||
_PyContext_ClearFreeList(tstate);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue