stronger encoding of free lists using two keys per page

This commit is contained in:
daan 2019-12-27 23:33:50 -08:00
parent ce02986d56
commit e3391d9a53
8 changed files with 83 additions and 50 deletions

View file

@ -193,6 +193,8 @@ mi_heap_t* mi_heap_new(void) {
heap->thread_id = _mi_thread_id();
_mi_random_split(&bheap->random, &heap->random);
heap->cookie = _mi_heap_random_next(heap) | 1;
heap->key[0] = _mi_heap_random_next(heap);
heap->key[1] = _mi_heap_random_next(heap);
heap->no_reclaim = true; // don't reclaim abandoned pages or otherwise destroy is unsafe
return heap;
}