Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add a note about the allocators.
  • Loading branch information
ericsnowcurrently committed Mar 8, 2022
commit ed4e05d18fe988f9075132128e8e8c44522002ee
19 changes: 10 additions & 9 deletions pep-0684.rst
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,13 @@ The following state will not be moved:
Also, a number of parts of the global state were already moved to the
interpreter, such as GC, warnings, and atexit hooks.
Comment thread
ericsnowcurrently marked this conversation as resolved.
Outdated

Memory Allocators
-----------------

<TBD>
Note that currently the allocators (see Objects/obmalloc.c) are shared
Comment thread
ericsnowcurrently marked this conversation as resolved.
Outdated
between all interpreters, protected by the GIL. They will need to move
to each interpreter (or a global lock will be needed). This is the
highest risk part of the work to isolate interpreters and may require
more than just moving fields down from ``_PyRuntimeState``. Some of
the complexity is reduced if CPython switches to a thread-safe
allocator like mimalloc.

.. _proposed capi:

Expand Down Expand Up @@ -585,14 +588,12 @@ Reference Implementation
Open Issues
===========

* what are the risks/hurdles involved with moving the allocators?
* add a helper to allow importing incompatible extensions?

Implementation details:

* explain sharing some global objects vs. sharing none of them?
* mention sharing the memory allocators?

Other:

* add a helper to allow importing incompatible extensions?


Deferred Functionality
Expand Down