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

Unified Diff: base/allocator/allocator_shim.h

Issue 2601573002: mac: Hook up allocator shim. (Closed)
Patch Set: Clean up. Created 4 years 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.h
diff --git a/base/allocator/allocator_shim.h b/base/allocator/allocator_shim.h
index 8fd060fca6aaeee76a74cdd613af09579a56b77d..27697386eb6d1d7e75a7c08f3825b2f9ab5c17db 100644
--- a/base/allocator/allocator_shim.h
+++ b/base/allocator/allocator_shim.h
@@ -62,6 +62,13 @@ struct AllocatorDispatch {
// allocation. If no good estimate is possible, returns zero.
using GetSizeEstimateFn = size_t(const AllocatorDispatch* self,
void* address);
+ using BatchMallocFn = unsigned(const AllocatorDispatch* self,
DmitrySkiba 2017/01/10 21:48:34 We should also add a callback for free_definite_si
+ size_t size,
+ void** results,
+ unsigned num_requested);
+ using BatchFreeFn = void(const AllocatorDispatch* self,
+ void** to_be_freed,
+ unsigned num_to_be_freed);
AllocFn* const alloc_function;
AllocZeroInitializedFn* const alloc_zero_initialized_function;
@@ -69,6 +76,8 @@ struct AllocatorDispatch {
ReallocFn* const realloc_function;
FreeFn* const free_function;
GetSizeEstimateFn* const get_size_estimate_function;
+ BatchMallocFn* const batch_malloc_function;
+ BatchFreeFn* const batch_free_function;
const AllocatorDispatch* next;

Powered by Google App Engine
This is Rietveld 408576698