bpo-40521: Make frame free list per-interpreter (GH-20638)

Each interpreter now has its own frame free list:

* Move frame free list into PyInterpreterState.
* Add _Py_frame_state structure.
* Add tstate parameter to _PyFrame_ClearFreeList()
  and _PyFrame_Fini().
* Remove "#if PyFrame_MAXFREELIST > 0".
* Remove "#ifdef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS".
This commit is contained in:
Victor Stinner 2020-06-05 01:39:24 +02:00 committed by GitHub
parent 7daba6f221
commit 3744ed2c9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 51 additions and 59 deletions

View file

@ -1249,10 +1249,7 @@ flush_std_files(void)
static void
finalize_interp_types(PyThreadState *tstate, int is_main_interp)
{
if (is_main_interp) {
/* Sundry finalizers */
_PyFrame_Fini();
}
_PyFrame_Fini(tstate);
_PyTuple_Fini(tstate);
if (is_main_interp) {
_PyList_Fini();