Revert "mimalloc: use "weak" random seed when statically linked"

In preparation for upgrading to a newer mimalloc version; This patch
will not be needed anymore, as it has been implemented in a slightly
different form in upstream mimalloc: 3e1d800e (potential fix for windows
static linking with thread creation in dll's, 2022-11-07).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin
2025-03-05 11:48:41 +01:00
parent 5a99a2018d
commit 9da41caad3

View File

@@ -302,11 +302,7 @@ static bool _mi_heap_init(void) {
_mi_memcpy_aligned(tld, &tld_empty, sizeof(*tld));
_mi_memcpy_aligned(heap, &_mi_heap_empty, sizeof(*heap));
heap->thread_id = _mi_thread_id();
#if defined(_WIN32) && !defined(MI_SHARED_LIB)
_mi_random_init_weak(&heap->random); // match mi_heap_main_init()
#else
_mi_random_init(&heap->random);
#endif
heap->cookie = _mi_heap_random_next(heap) | 1;
heap->keys[0] = _mi_heap_random_next(heap);
heap->keys[1] = _mi_heap_random_next(heap);