SIGN IN SIGN UP

gh-115184: Fix refleak tracking issues in free-threaded build (#115188)

Fixes a few issues related to refleak tracking in the free-threaded build:

- Count blocks in abandoned segments
- Call `_mi_page_free_collect` earlier during heap traversal in order to get an accurate count of blocks in use.
- Add missing refcount tracking in `_Py_DecRefSharedDebug` and `_Py_ExplicitMergeRefcount`.
- Pause threads in  `get_num_global_allocated_blocks` to ensure that traversing the mimalloc heaps is safe.
S
Sam Gross committed
31633f4473966b3bcd470440bab7f348711be48f
Parent: 769d444
Committed by GitHub <noreply@github.com> on 2/9/2024, 2:23:12 PM