Chromium Code Reviews| Index: base/allocator/allocator_extension.h |
| diff --git a/base/allocator/allocator_extension.h b/base/allocator/allocator_extension.h |
| index e2f1e709fe90c0d3e8d45b09467429cb6abce020..e51b9b06dc28d707e259bf54daf0f590218c5807 100644 |
| --- a/base/allocator/allocator_extension.h |
| +++ b/base/allocator/allocator_extension.h |
| @@ -7,17 +7,25 @@ |
| #include <stddef.h> // for size_t |
| -#include "base/allocator/allocator_extension_thunks.h" |
| #include "base/base_export.h" |
| #include "build/build_config.h" |
| namespace base { |
| namespace allocator { |
| +typedef void (*ReleaseFreeMemoryFunction)(); |
| +typedef bool (*GetNumericPropertyFunction)(const char* name, size_t* value); |
| + |
| // Request that the allocator release any free memory it knows about to the |
| // system. |
| BASE_EXPORT void ReleaseFreeMemory(); |
| +// Get the named property's |value|. Returns true if the property is known. |
| +// Returns false if the property is not a valid property name for the current |
| +// malloc implementation. |
|
Will Harris
2015/12/04 21:09:02
nit: s/malloc/allocator/
|
| +// |name| or |value| cannot be NULL |
| +BASE_EXPORT bool GetNumericProperty(const char* name, size_t* value); |
| + |
| // These settings allow specifying a callback used to implement the allocator |
| // extension functions. These are optional, but if set they must only be set |
| // once. These will typically called in an allocator-specific initialization |
| @@ -28,10 +36,10 @@ BASE_EXPORT void ReleaseFreeMemory(); |
| // functions. |
| BASE_EXPORT void SetReleaseFreeMemoryFunction( |
| - thunks::ReleaseFreeMemoryFunction release_free_memory_function); |
| + ReleaseFreeMemoryFunction release_free_memory_function); |
| BASE_EXPORT void SetGetNumericPropertyFunction( |
| - thunks::GetNumericPropertyFunction get_numeric_property_function); |
| + GetNumericPropertyFunction get_numeric_property_function); |
| } // namespace allocator |
| } // namespace base |