From d0898430fc3de731e41afc2e09029bf42ef4353a Mon Sep 17 00:00:00 2001 From: Maschell Date: Wed, 3 Jun 2020 18:51:55 +0200 Subject: [PATCH] Use the `MEM_HEAP_FLAG_USE_LOCK` flag on our custom heap for thread safe operations --- source/memory_mapping.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/memory_mapping.cpp b/source/memory_mapping.cpp index 0da4260..f9582af 100644 --- a/source/memory_mapping.cpp +++ b/source/memory_mapping.cpp @@ -410,7 +410,7 @@ void MemoryMapping_CreateHeaps() { } void *address = (void *) (mem_mapping[i].effective_start_address); uint32_t size = mem_mapping[i].effective_end_address - mem_mapping[i].effective_start_address; - MEMCreateExpHeapEx(address, size, 0); + MEMCreateExpHeapEx(address, size, MEM_HEAP_FLAG_USE_LOCK); DEBUG_FUNCTION_LINE("Created heap @%08X, size %d KiB", address, size / 1024); } }