Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/heap.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,11 @@ void _mi_heap_init(mi_heap_t* heap, mi_tld_t* tld, mi_arena_id_t arena_id, bool
heap->no_reclaim = noreclaim;
heap->tag = tag;
if (heap == tld->heap_backing) {
#if defined(_WIN32) && !defined(MI_SHARED_LIB)
_mi_random_init_weak(&heap->random); // prevent allocation failure during bcrypt dll initialization with static linking
#else
_mi_random_init(&heap->random);
#endif
}
else {
_mi_random_split(&tld->heap_backing->random, &heap->random);
Expand Down