]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-40521: Make list free list per-interpreter (GH-20642)
authorVictor Stinner <vstinner@python.org>
Fri, 5 Jun 2020 00:05:41 +0000 (02:05 +0200)
committerGitHub <noreply@github.com>
Fri, 5 Jun 2020 00:05:41 +0000 (02:05 +0200)
commit88ec9190105c9b03f49aaef601ce02b242a75273
tree699bea45830306ef5cd9943138a8c03d846e33d3
parent052d3fc0907be253cfd64b2c737a0b0aca586011
bpo-40521: Make list free list per-interpreter (GH-20642)

Each interpreter now has its own list free list:

* Move list numfree and free_list into PyInterpreterState.
* Add _Py_list_state structure.
* Add tstate parameter to _PyList_ClearFreeList()
  and _PyList_Fini().
* Remove "#ifdef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS".
* _PyGC_Fini() clears gcstate->garbage list which can be stored in
  the list free list. Call _PyGC_Fini() before _PyList_Fini() to
  prevent leaking this list.
Include/internal/pycore_gc.h
Include/internal/pycore_interp.h
Include/internal/pycore_pylifecycle.h
Misc/NEWS.d/next/Core and Builtins/2020-05-20-01-17-34.bpo-40521.wvAehI.rst
Modules/gcmodule.c
Objects/listobject.c
Python/pylifecycle.c