From 1d14f40031f444a261d66d5199aca1065527cd75 Mon Sep 17 00:00:00 2001 From: rubensturm <63977727+rubensturm@users.noreply.github.com> Date: Tue, 24 Dec 2024 15:09:29 +0100 Subject: [PATCH] fixed unnecessary set_specific in _mi_heap_set_default_direct --- src/init.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/init.c b/src/init.c index 68a1d7e29..f17b1d7b7 100644 --- a/src/init.c +++ b/src/init.c @@ -537,14 +537,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); + }