| 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_EXTENSION_THUNKS_H_ | 5 #ifndef BASE_ALLOCATOR_ALLOCATOR_EXTENSION_THUNKS_H_ |
| 6 #define BASE_ALLOCATOR_ALLOCATOR_EXTENSION_THUNKS_H_ | 6 #define BASE_ALLOCATOR_ALLOCATOR_EXTENSION_THUNKS_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 void (*GetStatsFunction)(char* buffer, int buffer_length); | |
| 19 void SetGetStatsFunction(GetStatsFunction get_stats_function); | |
| 20 GetStatsFunction GetGetStatsFunction(); | |
| 21 | |
| 22 typedef void (*ReleaseFreeMemoryFunction)(); | 18 typedef void (*ReleaseFreeMemoryFunction)(); |
| 23 void SetReleaseFreeMemoryFunction( | 19 void SetReleaseFreeMemoryFunction( |
| 24 ReleaseFreeMemoryFunction release_free_memory_function); | 20 ReleaseFreeMemoryFunction release_free_memory_function); |
| 25 ReleaseFreeMemoryFunction GetReleaseFreeMemoryFunction(); | 21 ReleaseFreeMemoryFunction GetReleaseFreeMemoryFunction(); |
| 26 | 22 |
| 27 typedef bool (*GetNumericPropertyFunction)(const char* name, size_t* value); | 23 typedef bool (*GetNumericPropertyFunction)(const char* name, size_t* value); |
| 28 void SetGetNumericPropertyFunction( | 24 void SetGetNumericPropertyFunction( |
| 29 GetNumericPropertyFunction get_numeric_property_function); | 25 GetNumericPropertyFunction get_numeric_property_function); |
| 30 GetNumericPropertyFunction GetGetNumericPropertyFunction(); | 26 GetNumericPropertyFunction GetGetNumericPropertyFunction(); |
| 31 | 27 |
| 32 } // namespace thunks | 28 } // namespace thunks |
| 33 } // namespace allocator | 29 } // namespace allocator |
| 34 } // namespace base | 30 } // namespace base |
| 35 | 31 |
| 36 #endif // BASE_ALLOCATOR_ALLOCATOR_EXTENSION_THUNKS_H_ | 32 #endif // BASE_ALLOCATOR_ALLOCATOR_EXTENSION_THUNKS_H_ |
| OLD | NEW |