Index: base/security_unittest.cc |
diff --git a/base/security_unittest.cc b/base/security_unittest.cc |
index 519c997eb0a1486834ad35f59e55321787b7b68d..61c7cf91524d8555c4d18eef0c1733bccda83540 100644 |
--- a/base/security_unittest.cc |
+++ b/base/security_unittest.cc |
@@ -14,6 +14,7 @@ |
#include <limits> |
#include <memory> |
+#include "base/allocator/features.h" |
#include "base/files/file_util.h" |
#include "base/logging.h" |
#include "base/memory/free_deleter.h" |
@@ -44,15 +45,10 @@ NOINLINE Type HideValueFromCompiler(volatile Type value) { |
return value; |
} |
-// Tcmalloc and Windows allocator shim support setting malloc limits. |
+// TCmalloc, currently supported only by Linux/CrOS, supports malloc limits. |
// - NO_TCMALLOC (should be defined if compiled with use_allocator!="tcmalloc") |
-// - ADDRESS_SANITIZER and SYZYASAN because they have their own memory allocator |
-// - IOS does not use tcmalloc |
-// - OS_MACOSX does not use tcmalloc |
-// - Windows allocator shim defines ALLOCATOR_SHIM |
-#if (!defined(NO_TCMALLOC) || defined(ALLOCATOR_SHIM)) && \ |
- !defined(ADDRESS_SANITIZER) && !defined(OS_IOS) && !defined(OS_MACOSX) && \ |
- !defined(SYZYASAN) |
+// - ADDRESS_SANITIZER it has its own memory allocator |
+#if defined(OS_LINUX) && !defined(NO_TCMALLOC) && !defined(ADDRESS_SANITIZER) |
#define MALLOC_OVERFLOW_TEST(function) function |
#else |
#define MALLOC_OVERFLOW_TEST(function) DISABLED_##function |