Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3685)

Unified Diff: base/allocator/allocator_check.cc

Issue 2676093003: mac: Hook up allocator shim during app startup. (Closed)
Patch Set: Remove unused include. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/allocator/allocator_interception_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/allocator/allocator_check.cc
diff --git a/base/allocator/allocator_check.cc b/base/allocator/allocator_check.cc
index 5a0564d2f3efd895c9e77e16ec903c7e5295e48d..87d0e7ef61cf39097db766991efea031aff62db6 100644
--- a/base/allocator/allocator_check.cc
+++ b/base/allocator/allocator_check.cc
@@ -14,6 +14,10 @@
#include <malloc.h>
#endif
+#if defined(OS_MACOSX)
+#include "base/allocator/allocator_interception_mac.h"
+#endif
+
namespace base {
namespace allocator {
@@ -28,6 +32,9 @@ bool IsAllocatorInitialized() {
#define TC_MALLOPT_IS_OVERRIDDEN_BY_TCMALLOC 0xbeef42
return (mallopt(TC_MALLOPT_IS_OVERRIDDEN_BY_TCMALLOC, 0) ==
TC_MALLOPT_IS_OVERRIDDEN_BY_TCMALLOC);
+#elif defined(OS_MACOSX) && !defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
+ // From allocator_interception_mac.mm.
+ return base::allocator::g_replaced_default_zone;
#else
return true;
#endif
« no previous file with comments | « no previous file | base/allocator/allocator_interception_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698