From 068dc014ec5f2bc32133e986a273b69e0c8a936a 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 e6693899..dfef2c69 100644 --- a/include/mimalloc.h +++ b/include/mimalloc.h @@ -487,6 +487,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 {