add sampling for guarded objects

This commit is contained in:
daanx 2024-11-17 00:06:16 -08:00
parent 8b6017d976
commit 8ba1879073
10 changed files with 75 additions and 11 deletions

View file

@ -221,6 +221,7 @@ void _mi_heap_init(mi_heap_t* heap, mi_tld_t* tld, mi_arena_id_t arena_id, bool
heap->cookie = _mi_heap_random_next(heap) | 1;
heap->keys[0] = _mi_heap_random_next(heap);
heap->keys[1] = _mi_heap_random_next(heap);
_mi_heap_guarded_init(heap);
// push on the thread local heaps list
heap->next = heap->tld->heaps;
heap->tld->heaps = heap;