Compare commits

...

3 commits

2 changed files with 5 additions and 3 deletions

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 {

View file

@ -32,6 +32,9 @@ terms of the MIT license. A copy of the license can be found in the file
#if defined(__linux__)
#include <features.h>
#include <sys/prctl.h> // THP disable, PR_SET_VMA
#if !defined(PR_SET_VMA)
#include <linux/prctl.h>
#endif
#if defined(__GLIBC__)
#include <linux/mman.h> // linux mmap flags
#else