]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-100240: Use a consistent implementation for freelists (#121934)
authorSam Gross <colesbury@gmail.com>
Mon, 22 Jul 2024 16:08:27 +0000 (12:08 -0400)
committerGitHub <noreply@github.com>
Mon, 22 Jul 2024 16:08:27 +0000 (12:08 -0400)
commit5716cc352940a5f8557a8191e873837aa619498a
treea9b1526a46acfe002950b9ad0d046f03c7cab5e9
parent2408a8a22bd13d8f15172a2ecf8bbbc4355dcb3b
gh-100240: Use a consistent implementation for freelists (#121934)

This combines and updates our freelist handling to use a consistent
implementation. Objects in the freelist are linked together using the
first word of memory block.

If configured with freelists disabled, these operations are essentially
no-ops.
27 files changed:
Include/internal/pycore_context.h
Include/internal/pycore_dict.h
Include/internal/pycore_floatobject.h
Include/internal/pycore_freelist.h
Include/internal/pycore_freelist_state.h [new file with mode: 0644]
Include/internal/pycore_gc.h
Include/internal/pycore_list.h
Include/internal/pycore_object_stack.h
Include/internal/pycore_object_state.h
Include/internal/pycore_pystate.h
Include/internal/pycore_tstate.h
Makefile.pre.in
Objects/dictobject.c
Objects/floatobject.c
Objects/genobject.c
Objects/listobject.c
Objects/object.c
Objects/sliceobject.c
Objects/tupleobject.c
PCbuild/pythoncore.vcxproj
PCbuild/pythoncore.vcxproj.filters
Python/context.c
Python/gc_free_threading.c
Python/gc_gil.c
Python/object_stack.c
Python/pylifecycle.c
Python/pystate.c