Chromium Code Reviews| Index: base/security_unittest.cc |
| diff --git a/base/security_unittest.cc b/base/security_unittest.cc |
| index 519c997eb0a1486834ad35f59e55321787b7b68d..7a63523c2196250e15c621ef8a6ae6778a2f20c8 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 they it has its own memory allocator |
|
Sigurður Ásgeirsson
2017/05/25 12:54:21
wonky verbiage here.
Primiano Tucci (use gerrit)
2017/05/25 13:01:16
Done.
|
| +#if defined(OS_LINUX) && !defined(NO_TCMALLOC) && !defined(ADDRESS_SANITIZER) |
| #define MALLOC_OVERFLOW_TEST(function) function |
| #else |
| #define MALLOC_OVERFLOW_TEST(function) DISABLED_##function |