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

Unified Diff: base/allocator/allocator_check.cc

Issue 2676093003: mac: Hook up allocator shim during app startup. (Closed)
Patch Set: Comments from primiano. 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
Index: base/allocator/allocator_check.cc
diff --git a/base/allocator/allocator_check.cc b/base/allocator/allocator_check.cc
index 5a0564d2f3efd895c9e77e16ec903c7e5295e48d..f25add6862fbde6eef8fd5c2b9b58c39d6fbeb9e 100644
--- a/base/allocator/allocator_check.cc
+++ b/base/allocator/allocator_check.cc
@@ -4,6 +4,7 @@
#include "base/allocator/allocator_check.h"
+#include "base/allocator/features.h"
#include "build/build_config.h"
#if defined(OS_WIN)
@@ -14,6 +15,10 @@
#include <malloc.h>
#endif
+#if defined(OS_MACOSX)
+#include "base/allocator/allocator_shim.h"
+#endif
+
namespace base {
namespace allocator {
@@ -28,6 +33,8 @@ 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) && BUILDFLAG(USE_EXPERIMENTAL_ALLOCATOR_SHIM)
Primiano Tucci (use gerrit) 2017/02/07 11:58:08 I think this should really be: #elif defined(OS_MA
erikchen 2017/02/09 23:49:04 Done.
+ return g_is_mac_shim_layer_initialized;
#else
return true;
#endif
« no previous file with comments | « no previous file | base/allocator/allocator_interception_mac.mm » ('j') | base/allocator/allocator_interception_mac.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698