diff options
Diffstat (limited to 'Objects/mimalloc/alloc.c')
-rw-r--r-- | Objects/mimalloc/alloc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Objects/mimalloc/alloc.c b/Objects/mimalloc/alloc.c index e6286b5..c133f23 100644 --- a/Objects/mimalloc/alloc.c +++ b/Objects/mimalloc/alloc.c @@ -609,7 +609,10 @@ bool _mi_free_delayed_block(mi_block_t* block) { // get segment and page const mi_segment_t* const segment = _mi_ptr_segment(block); mi_assert_internal(_mi_ptr_cookie(segment) == segment->cookie); +#ifndef Py_GIL_DISABLED + // The GC traverses heaps of other threads, which can trigger this assert. mi_assert_internal(_mi_thread_id() == segment->thread_id); +#endif mi_page_t* const page = _mi_segment_page_of(segment, block); // Clear the no-delayed flag so delayed freeing is used again for this page. |