Index: base/allocator/allocator_shim.cc |
diff --git a/base/allocator/allocator_shim.cc b/base/allocator/allocator_shim.cc |
index 48b13501fe443ddc2062a1fab5e14a43a3a19649..a401139ee652d5043279aa899674aba7b82101b1 100644 |
--- a/base/allocator/allocator_shim.cc |
+++ b/base/allocator/allocator_shim.cc |
@@ -23,6 +23,8 @@ |
#if defined(OS_MACOSX) |
#include <malloc/malloc.h> |
+ |
+#include "base/allocator/allocator_interception_mac.h" |
#endif |
// No calls to malloc / new in this file. They would would cause re-entrancy of |
@@ -324,9 +326,11 @@ void InitializeAllocatorShim() { |
// traversed the shim this will route them to the default malloc zone. |
InitializeDefaultDispatchToMacAllocator(); |
+ MallocZoneFunctions functions = MallocZoneFunctionsToReplaceDefault(); |
Primiano Tucci (use gerrit)
2017/03/21 19:39:23
out of curiosity why this doesn't happen in alloca
erikchen
2017/03/24 21:59:03
allocator_shim depends on allocator_shim_default_d
|
+ |
// This replaces the default malloc zone, causing calls to malloc & friends |
// from the codebase to be routed to ShimMalloc() above. |
- OverrideMacSymbols(); |
+ base::allocator::ReplaceFunctionsForStoredZones(&functions); |
} |
} // namespace allocator |
} // namespace base |