Index: base/allocator/allocator_shim.cc |
diff --git a/base/allocator/allocator_shim.cc b/base/allocator/allocator_shim.cc |
index a9fc095b905e620dd8e2df9f060fd28e32629e27..0d0e7d9f070531edb02382e6779199b55a6be3bc 100644 |
--- a/base/allocator/allocator_shim.cc |
+++ b/base/allocator/allocator_shim.cc |
@@ -241,6 +241,24 @@ void ShimFree(void* address) { |
return chain_head->free_function(chain_head, address); |
} |
+size_t ShimGetSizeEstimate(const void* address) { |
+ const allocator::AllocatorDispatch* const chain_head = GetChainHead(); |
+ return chain_head->get_size_estimate_function(chain_head, |
+ const_cast<void*>(address)); |
+} |
+ |
+unsigned ShimBatchMalloc(size_t size, void** results, unsigned num_requested) { |
+ const allocator::AllocatorDispatch* const chain_head = GetChainHead(); |
+ return chain_head->batch_malloc_function(chain_head, size, results, |
+ num_requested); |
+} |
+ |
+void ShimBatchFree(void** to_be_freed, unsigned num_to_be_freed) { |
+ const allocator::AllocatorDispatch* const chain_head = GetChainHead(); |
+ return chain_head->batch_free_function(chain_head, to_be_freed, |
+ num_to_be_freed); |
+} |
+ |
} // extern "C" |
#if !defined(OS_WIN) |
@@ -257,6 +275,8 @@ void ShimFree(void* address) { |
#elif defined(OS_WIN) |
// On Windows we use plain link-time overriding of the CRT symbols. |
#include "base/allocator/allocator_shim_override_ucrt_symbols_win.h" |
+#elif defined(OS_MACOSX) |
+#include "base/allocator/allocator_shim_override_mac_symbols.h" |
#else |
#include "base/allocator/allocator_shim_override_libc_symbols.h" |
#endif |