diff options
author | daan <daanl@outlook.com> | 2019-11-13 17:22:03 -0800 |
---|---|---|
committer | daan <daanl@outlook.com> | 2019-11-13 17:22:03 -0800 |
commit | a4ed63d1273befbe2c8835395f3137564d3af7e9 (patch) | |
tree | ee78427fbc0437e85ed483e01bb781df23a338e2 /include/mimalloc-internal.h | |
parent | f0e02bab0344e099fe491eb24690a0b9a08cf6e0 (diff) |
Adresses pr #165 and issue #164 by @colesbury:
On Mac OS, the thread-local _mi_default_heap may get reset before
_mi_thread_done is called, leaking the default heap on non-main threads.
Now the current default heap is also stored in mi_pthread_key (or mi_fls_key
on Windows). The _mi_thread_done function is called with this value.
Diffstat (limited to 'include/mimalloc-internal.h')
-rw-r--r-- | include/mimalloc-internal.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/mimalloc-internal.h b/include/mimalloc-internal.h index ccf12a0..7384933 100644 --- a/include/mimalloc-internal.h +++ b/include/mimalloc-internal.h @@ -101,6 +101,7 @@ uint8_t _mi_bsr(uintptr_t x); // bit-scan-right, used on BSD i void _mi_heap_destroy_pages(mi_heap_t* heap); void _mi_heap_collect_abandon(mi_heap_t* heap); uintptr_t _mi_heap_random(mi_heap_t* heap); +void _mi_heap_set_default_direct(mi_heap_t* heap); // "stats.c" void _mi_stats_done(mi_stats_t* stats); |