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

Unified Diff: base/allocator/allocator_shim.cc

Issue 2727463002: mac: Several minor fixes to allocator shim. (Closed)
Patch Set: more compile error. Created 3 years, 9 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 | « base/allocator/allocator_interception_mac.mm ('k') | base/allocator/allocator_shim_override_mac_symbols.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/allocator/allocator_shim.cc
diff --git a/base/allocator/allocator_shim.cc b/base/allocator/allocator_shim.cc
index 7a5cfd6c6eeb1983553e9757a284b5ef96d52765..36736cdc78d79105718b3f0790f843dc3dd63a76 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
@@ -326,9 +328,11 @@ void InitializeAllocatorShim() {
// traversed the shim this will route them to the default malloc zone.
InitializeDefaultDispatchToMacAllocator();
+ MallocZoneFunctions functions = MallocZoneFunctionsToReplaceDefault();
+
// 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
« no previous file with comments | « base/allocator/allocator_interception_mac.mm ('k') | base/allocator/allocator_shim_override_mac_symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698