bpo-40521: Make MemoryError free list per interpreter by vstinner · Pull Request #21086 · python/cpython

@vstinner

Each interpreter now has its own MemoryError free list: it is not
longer shared by all interpreters.

Add _Py_exc_state structure and PyInterpreterState.exc_state member.
Move also errnomap into _Py_exc_state.

Rename MEMERRORS_SAVE macro to _PY_MEMERRORS_SAVE.

fasih pushed a commit to fasih/cpython that referenced this pull request

Jun 29, 2020
Each interpreter now has its own MemoryError free list: it is not
longer shared by all interpreters.

Add _Py_exc_state structure and PyInterpreterState.exc_state member.
Move also errnomap into _Py_exc_state.