This commit is contained in:
rubensturm1 2025-04-07 14:01:01 +08:00 committed by GitHub
commit 185016702d
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: B5690EEEBB952194

View file

@ -535,14 +535,13 @@ void _mi_heap_set_default_direct(mi_heap_t* heap) {
#elif defined(MI_TLS_PTHREAD_SLOT_OFS)
*mi_prim_tls_pthread_heap_slot() = heap;
#elif defined(MI_TLS_PTHREAD)
_mi_prim_thread_associate_default_heap(heap);
// we use _mi_heap_default_key
#else
_mi_heap_default = heap;
#endif
// ensure the default heap is passed to `_mi_thread_done`
// setting to a non-NULL value also ensures `mi_thread_done` is called.
_mi_prim_thread_associate_default_heap(heap);
}
void mi_thread_set_in_threadpool(void) mi_attr_noexcept {