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

Unified Diff: base/allocator/allocator_shim_default_dispatch_to_linker_wrapped_symbols.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_linker_wrapped_symbols.cc
diff --git a/base/allocator/allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc b/base/allocator/allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc
index 0fe7719dbc88575a2456a169f01898dfa6479723..e33754a443feffe5daeba1d7981cb81e89112bb5 100644
--- a/base/allocator/allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc
+++ b/base/allocator/allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc
@@ -32,23 +32,32 @@ namespace {
using base::allocator::AllocatorDispatch;
-void* RealMalloc(const AllocatorDispatch*, size_t size) {
+void* RealMalloc(const AllocatorDispatch*, size_t size, void* context) {
return __real_malloc(size);
}
-void* RealCalloc(const AllocatorDispatch*, size_t n, size_t size) {
+void* RealCalloc(const AllocatorDispatch*,
+ size_t n,
+ size_t size,
+ void* context) {
return __real_calloc(n, size);
}
-void* RealRealloc(const AllocatorDispatch*, void* address, size_t size) {
+void* RealRealloc(const AllocatorDispatch*,
+ void* address,
+ size_t size,
+ void* context) {
return __real_realloc(address, size);
}
-void* RealMemalign(const AllocatorDispatch*, size_t alignment, size_t size) {
+void* RealMemalign(const AllocatorDispatch*,
+ size_t alignment,
+ size_t size,
+ void* context) {
return __real_memalign(alignment, size);
}
-void RealFree(const AllocatorDispatch*, void* address) {
+void RealFree(const AllocatorDispatch*, void* address, void* context) {
__real_free(address);
}
@@ -56,7 +65,9 @@ void RealFree(const AllocatorDispatch*, void* address) {
size_t DummyMallocUsableSize(const void*) { return 0; }
#endif
-size_t RealSizeEstimate(const AllocatorDispatch*, void* address) {
+size_t RealSizeEstimate(const AllocatorDispatch*,
+ void* address,
+ void* context) {
#if defined(OS_ANDROID)
#if __ANDROID_API__ < 17
// malloc_usable_size() is available only starting from API 17.

Powered by Google App Engine
This is Rietveld 408576698