gh-112529: Use GC heaps for GC allocations in free-threaded builds (gh-114157)

* gh-112529: Use GC heaps for GC allocations in free-threaded builds

The free-threaded build's garbage collector implementation will need to
find GC objects by traversing mimalloc heaps. This hooks up the
allocation calls with the correct heaps by using a thread-local
"current_obj_heap" variable.

* Refactor out setting heap based on type
This commit is contained in:
Sam Gross 2024-01-20 11:14:45 -05:00 • committed by GitHub
parent b1ad5a5d44
commit 1d6d5e854c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 85 additions and 7 deletions

View file

@ -1852,6 +1852,7 @@ PYTHON_HEADERS= \
$(srcdir)/Include/internal/pycore_moduleobject.h \
$(srcdir)/Include/internal/pycore_namespace.h \
$(srcdir)/Include/internal/pycore_object.h \
$(srcdir)/Include/internal/pycore_object_alloc.h \
$(srcdir)/Include/internal/pycore_object_state.h \
$(srcdir)/Include/internal/pycore_obmalloc.h \
$(srcdir)/Include/internal/pycore_obmalloc_init.h \