From 4431fd17ced051e9a676ee05b14e2edd2c8c773b Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Mon, 24 Oct 2022 10:09:56 +0100 Subject: [PATCH] memory_manager: add support for MacOS & Windows to the new size tracking system --- src/util/memory_manager.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/util/memory_manager.cpp b/src/util/memory_manager.cpp index a2c8e31a4..290881ba5 100644 --- a/src/util/memory_manager.cpp +++ b/src/util/memory_manager.cpp @@ -16,10 +16,17 @@ Copyright (c) 2015 Microsoft Corporation #ifdef __GLIBC__ # include # define HAS_MALLOC_USABLE_SIZE -#endif -#ifdef __FreeBSD__ +#elif defined(__APPLE__) +# include +# define HAS_MALLOC_USABLE_SIZE +# define malloc_usable_size malloc_size +#elif defined(__FreeBSD__) # include # define HAS_MALLOC_USABLE_SIZE +#elif defined(_WINDOWS) +# include +# define HAS_MALLOC_USABLE_SIZE +# define malloc_usable_size _msize #endif // The following two function are automatically generated by the mk_make.py script.