merge from dev

This commit is contained in:
Daan Leijen 2021-01-29 16:53:52 -08:00
commit b93cba3b05
9 changed files with 46 additions and 16 deletions

View file

@ -213,8 +213,8 @@ static bool _mi_heap_init(void) {
// OS allocated so already zero initialized
mi_tld_t* tld = &td->tld;
mi_heap_t* heap = &td->heap;
memcpy(tld, &tld_empty, sizeof(*tld));
memcpy(heap, &_mi_heap_empty, sizeof(*heap));
_mi_memcpy(tld, &tld_empty, sizeof(*tld));
_mi_memcpy(heap, &_mi_heap_empty, sizeof(*heap));
heap->thread_id = _mi_thread_id();
_mi_random_init(&heap->random);
heap->cookie = _mi_heap_random_next(heap) | 1;