cpython/Objects/mimalloc
Sam Gross 0b7476080b
gh-112532: Tag mimalloc heaps and pages (#113742)
* gh-112532: Tag mimalloc heaps and pages

Mimalloc pages are data structures that contain contiguous allocations
of the same block size. Note that they are distinct from operating
system pages. Mimalloc pages are contained in segments.

When a thread exits, it abandons any segments and contained pages that
have live allocations. These segments and pages may be later reclaimed
by another thread. To support GC and certain thread-safety guarantees in
free-threaded builds, we want pages to only be reclaimed by the
corresponding heap in the claimant thread. For example, we want pages
containing GC objects to only be claimed by GC heaps.

This allows heaps and pages to be tagged with an integer tag that is
used to ensure that abandoned pages are only claimed by heaps with the
same tag. Heaps can be initialized with a tag (0-15); any page allocated
by that heap copies the corresponding tag.

* Fix conversion warning
2024-01-05 12:08:50 -08:00
..
prim gh-112027: Don't print mimalloc warning after mmap() call (gh-113372) 2023-12-22 09:38:27 +09:00
alloc-aligned.c
alloc-override.c
alloc-posix.c
alloc.c
arena.c
bitmap.c
bitmap.h
heap.c gh-112532: Tag mimalloc heaps and pages (#113742) 2024-01-05 12:08:50 -08:00
init.c gh-112532: Tag mimalloc heaps and pages (#113742) 2024-01-05 12:08:50 -08:00
options.c
os.c
page-queue.c
page.c gh-112532: Tag mimalloc heaps and pages (#113742) 2024-01-05 12:08:50 -08:00
random.c
segment-map.c
segment.c gh-112532: Tag mimalloc heaps and pages (#113742) 2024-01-05 12:08:50 -08:00
static.c
stats.c