From b0876ab878c55f58aba16b91810d9816baf333d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Teodor=20Sp=C3=A6ren?= Date: Sat, 9 Mar 2024 14:13:33 +0100 Subject: [PATCH] Avoid compilation error when passing in heap to allocators Before it would not work to create the mi_heap_stl_allocator types with passing in a "mi_heap_t*", since sizeof is used and it gives a compilation error. This change fixes that. --- include/mimalloc.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/mimalloc.h b/include/mimalloc.h index b61f2a48..1b28b392 100644 --- a/include/mimalloc.h +++ b/include/mimalloc.h @@ -488,6 +488,7 @@ template bool operator!=(const mi_stl_allocator& , const #define MI_HAS_HEAP_STL_ALLOCATOR 1 #include // std::shared_ptr +#include "mimalloc/types.h" // Common base class for STL allocators in a specific heap template struct _mi_heap_stl_allocator_common : public _mi_stl_allocator_common {