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

Unified Diff: base/allocator/allocator_shim_default_dispatch_to_tcmalloc.cc

Issue 2697123007: base: Add support for malloc zones to the allocator shim (Closed)
Patch Set: Windows compile error. 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_shim_default_dispatch_to_tcmalloc.cc
diff --git a/base/allocator/allocator_shim_default_dispatch_to_tcmalloc.cc b/base/allocator/allocator_shim_default_dispatch_to_tcmalloc.cc
index c90b4c8e879d8fe689fbdc1087e2182ec64c68ba..878e8a725c2867c3be49173aad276527f9b22bf7 100644
--- a/base/allocator/allocator_shim_default_dispatch_to_tcmalloc.cc
+++ b/base/allocator/allocator_shim_default_dispatch_to_tcmalloc.cc
@@ -11,27 +11,35 @@ namespace {
using base::allocator::AllocatorDispatch;
-void* TCMalloc(const AllocatorDispatch*, size_t size) {
+void* TCMalloc(const AllocatorDispatch*, size_t size, void* context) {
return tc_malloc(size);
}
-void* TCCalloc(const AllocatorDispatch*, size_t n, size_t size) {
+void* TCCalloc(const AllocatorDispatch*, size_t n, size_t size, void* context) {
return tc_calloc(n, size);
}
-void* TCMemalign(const AllocatorDispatch*, size_t alignment, size_t size) {
+void* TCMemalign(const AllocatorDispatch*,
+ size_t alignment,
+ size_t size,
+ void* context) {
return tc_memalign(alignment, size);
}
-void* TCRealloc(const AllocatorDispatch*, void* address, size_t size) {
+void* TCRealloc(const AllocatorDispatch*,
+ void* address,
+ size_t size,
+ void* context) {
return tc_realloc(address, size);
}
-void TCFree(const AllocatorDispatch*, void* address) {
+void TCFree(const AllocatorDispatch*, void* address, void* context) {
tc_free(address);
}
-size_t TCGetSizeEstimate(const AllocatorDispatch*, void* address) {
+size_t TCGetSizeEstimate(const AllocatorDispatch*,
+ void* address,
+ void* context) {
return tc_malloc_size(address);
}

Powered by Google App Engine
This is Rietveld 408576698