Chromium Code Reviews| Index: base/allocator/allocator_shim.h |
| diff --git a/base/allocator/allocator_shim.h b/base/allocator/allocator_shim.h |
| index f1a1e3d7ce0386361480f285cc24f206aee27ac5..53d4f1387faa0a33959a02f95ad521a34c2c4c87 100644 |
| --- a/base/allocator/allocator_shim.h |
| +++ b/base/allocator/allocator_shim.h |
| @@ -56,12 +56,19 @@ struct AllocatorDispatch { |
| void* address, |
| size_t size); |
| using FreeFn = void(const AllocatorDispatch* self, void* address); |
| + // Returns the best available estimate for the actual amount of memory |
| + // consumed by the allocation |address|. If possible, this should include |
| + // heap overhead or at least a decent estimate of the full cost of the |
| + // allocation. |
| + using GetSizeEstimateFn = size_t(const AllocatorDispatch* self, |
|
Primiano Tucci (use gerrit)
2016/08/24 14:11:46
I don't think that this function should be part of
Primiano Tucci (use gerrit)
2016/08/24 15:28:46
siggi@ and I had a chat offline. siggi@ explained
Sigurður Ásgeirsson
2016/09/01 15:18:17
Yeah - it would be nice to fully abstract the noti
Sigurður Ásgeirsson
2016/09/01 15:18:17
Acknowledged.
|
| + void* address); |
| AllocFn* const alloc_function; |
| AllocZeroInitializedFn* const alloc_zero_initialized_function; |
| AllocAlignedFn* const alloc_aligned_function; |
| ReallocFn* const realloc_function; |
| FreeFn* const free_function; |
| + GetSizeEstimateFn* const get_size_estimate_function; |
| const AllocatorDispatch* next; |