Index: base/allocator/allocator_shim.cc |
diff --git a/base/allocator/allocator_shim.cc b/base/allocator/allocator_shim.cc |
index f68903503655605a9d8ac2fdc5ba5909c5be8963..af08ec039fd73af7a90a879c6fd54cd88060d883 100644 |
--- a/base/allocator/allocator_shim.cc |
+++ b/base/allocator/allocator_shim.cc |
@@ -232,8 +232,14 @@ void ShimFree(void* address) { |
// Cpp symbols (new / delete) should always be routed through the shim layer. |
#include "base/allocator/allocator_shim_override_cpp_symbols.h" |
+// Android does not support symbol interposition. The way malloc symbols are |
+// intercepted on Android is by using link-time -wrap flags. |
+#if !defined(OS_ANDROID) |
// Ditto for plain malloc() / calloc() / free() etc. symbols. |
#include "base/allocator/allocator_shim_override_libc_symbols.h" |
+#else |
+#include "base/allocator/allocator_shim_override_linker_wrapped_symbols.h" |
+#endif |
// In the case of tcmalloc we also want to plumb into the glibc hooks |
// to avoid that allocations made in glibc itself (e.g., strdup()) get |