| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BASE_ALLOCATOR_ALLOCATOR_THUNKS_EXTENSION_H | 5 #ifndef BASE_ALLOCATOR_ALLOCATOR_THUNKS_EXTENSION_H |
| 6 #define BASE_ALLOCATOR_ALLOCATOR_THUNKS_EXTENSION_H | 6 #define BASE_ALLOCATOR_ALLOCATOR_THUNKS_EXTENSION_H |
| 7 | 7 |
| 8 #include <stddef.h> // for size_t | 8 #include <stddef.h> // for size_t |
| 9 | 9 |
| 10 namespace base { | 10 namespace base { |
| 11 namespace allocator { | 11 namespace allocator { |
| 12 namespace thunks { | 12 namespace thunks { |
| 13 | 13 |
| 14 // WARNING: You probably don't want to use this file unless you are routing a | 14 // WARNING: You probably don't want to use this file unless you are routing a |
| 15 // new allocator extension from a specific allocator implementation to base. | 15 // new allocator extension from a specific allocator implementation to base. |
| 16 // See allocator_extension.h to see the interface that base exports. | 16 // See allocator_extension.h to see the interface that base exports. |
| 17 | 17 |
| 18 typedef bool (*GetPropertyFunction)(const char* name, size_t* value); | 18 typedef bool (*GetAllocatorWasteSizeFunction)(size_t* size); |
| 19 void SetGetPropertyFunction(GetPropertyFunction get_property_function); | 19 void SetGetAllocatorWasteSizeFunction( |
| 20 GetPropertyFunction GetGetPropertyFunction(); | 20 GetAllocatorWasteSizeFunction get_allocator_waste_size_function); |
| 21 GetAllocatorWasteSizeFunction GetGetAllocatorWasteSizeFunction(); |
| 21 | 22 |
| 22 typedef void (*GetStatsFunction)(char* buffer, int buffer_length); | 23 typedef void (*GetStatsFunction)(char* buffer, int buffer_length); |
| 23 void SetGetStatsFunction(GetStatsFunction get_stats_function); | 24 void SetGetStatsFunction(GetStatsFunction get_stats_function); |
| 24 GetStatsFunction GetGetStatsFunction(); | 25 GetStatsFunction GetGetStatsFunction(); |
| 25 | 26 |
| 26 typedef void (*ReleaseFreeMemoryFunction)(); | 27 typedef void (*ReleaseFreeMemoryFunction)(); |
| 27 void SetReleaseFreeMemoryFunction( | 28 void SetReleaseFreeMemoryFunction( |
| 28 ReleaseFreeMemoryFunction release_free_memory_function); | 29 ReleaseFreeMemoryFunction release_free_memory_function); |
| 29 ReleaseFreeMemoryFunction GetReleaseFreeMemoryFunction(); | 30 ReleaseFreeMemoryFunction GetReleaseFreeMemoryFunction(); |
| 30 | 31 |
| 31 } // namespace thunks | 32 } // namespace thunks |
| 32 } // namespace allocator | 33 } // namespace allocator |
| 33 } // namespace base | 34 } // namespace base |
| 34 | 35 |
| 35 #endif | 36 #endif |
| OLD | NEW |