mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-03 22:19:32 +03:00
Merge 1d14f40031
into fae61ed946
This commit is contained in:
commit
f8c4d390b0
1 changed files with 2 additions and 3 deletions
|
@ -535,14 +535,13 @@ void _mi_heap_set_default_direct(mi_heap_t* heap) {
|
||||||
#elif defined(MI_TLS_PTHREAD_SLOT_OFS)
|
#elif defined(MI_TLS_PTHREAD_SLOT_OFS)
|
||||||
*mi_prim_tls_pthread_heap_slot() = heap;
|
*mi_prim_tls_pthread_heap_slot() = heap;
|
||||||
#elif defined(MI_TLS_PTHREAD)
|
#elif defined(MI_TLS_PTHREAD)
|
||||||
|
_mi_prim_thread_associate_default_heap(heap);
|
||||||
// we use _mi_heap_default_key
|
// we use _mi_heap_default_key
|
||||||
#else
|
#else
|
||||||
_mi_heap_default = heap;
|
_mi_heap_default = heap;
|
||||||
#endif
|
#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 {
|
void mi_thread_set_in_threadpool(void) mi_attr_noexcept {
|
||||||
|
|
Loading…
Add table
Reference in a new issue