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.