Skip to content

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Jun 4, 2020

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.

https://bugs.python.org/issue40521

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.
@vstinner
Copy link
Member Author

vstinner commented Jun 4, 2020

Thanks to "./python -m test -j0 -R 3:3 test_capi test__xxsubinterpreters test_atexit test_threading", I found a leak. It's fixed as part of this PR: "Call _PyGC_Fini() before _PyList_Fini()".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants