Don't try to use the malloc_usable_size portability implementation if we have JEMalloc
[folly.git] / folly / portability / Malloc.cpp
index 402ee099dde8b6eb7dff68d325df6e2562742e5e..9baecb38e226fddbac7227fe3fbf4bd7ef0f71e2 100755 (executable)
@@ -16,6 +16,7 @@
 
 #include <folly/portability/Malloc.h>
 
+#ifndef USE_JEMALLOC
 #if defined(__APPLE__) && !defined(FOLLY_HAVE_MALLOC_USABLE_SIZE)
 #include <malloc/malloc.h>
 
@@ -27,3 +28,4 @@ extern "C" size_t malloc_usable_size(void* addr) {
   return _msize(addr);
 }
 #endif
+#endif