fix ASAN build
[folly.git] / folly / memory / Malloc.h
index e774dd0e907bffe80f1c473ac4ac872685906054..9eaf2c6ccec0f2777614262295924f32ed8d1dc9 100644 (file)
@@ -144,10 +144,11 @@ namespace folly {
 #define FOLLY_MALLOC_CHECKED_MALLOC
 #endif
 
+#include <folly/CPortability.h>
 /**
  * Determine if we are using jemalloc or not.
  */
-#ifdef USE_JEMALLOC
+#if defined(USE_JEMALLOC) && !FOLLY_SANITIZE
 inline bool usingJEMalloc() noexcept {
   return true;
 }