]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-112529: Use GC heaps for GC allocations in free-threaded builds (gh-114157)
authorSam Gross <colesbury@gmail.com>
Sat, 20 Jan 2024 16:14:45 +0000 (11:14 -0500)
committerGitHub <noreply@github.com>
Sat, 20 Jan 2024 16:14:45 +0000 (01:14 +0900)
commit1d6d5e854c375821a64fa9c2fbb04a36fb3b9aaa
tree4bd78a9aca8990260d29c54202249936b685a5c6
parentb1ad5a5d446f944a45c43a3e865d1d8f47611071
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
Include/internal/pycore_object_alloc.h [new file with mode: 0644]
Makefile.pre.in
Objects/typeobject.c
PCbuild/pythoncore.vcxproj
PCbuild/pythoncore.vcxproj.filters
Python/gc.c