mimalloc
mimalloc copied to clipboard
mi_heap_new() Is multithreading unsafe, as expected?
windows - x86
heap = mi_heap_new()
Error prone code in multithreading: address = mi_heap_malloc(heap, 666) .................................. mi_free(address)
Code for safe operation without errors: EnterCriticalSection() address = mi_heap_malloc(heap, 666) LeaveCriticalSection() .................................. EnterCriticalSection() mi_free(address) LeaveCriticalSection()
Is this a bug or a design that meets expectations?