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

Unified Diff: base/allocator/allocator_extension_thunks.h

Issue 10825250: Expose memory allocator internal stats and properties. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add jemalloc.h include Created 8 years, 3 months 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
« no previous file with comments | « base/allocator/allocator_extension.cc ('k') | base/allocator/allocator_extension_thunks.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/allocator/allocator_extension_thunks.h
diff --git a/base/allocator/allocator_extension_thunks.h b/base/allocator/allocator_extension_thunks.h
index 4a46b450dbd5e04d64aee9129837f5ef93841e7d..3b0e4edc088c276378ef2e1a274368e3431599da 100644
--- a/base/allocator/allocator_extension_thunks.h
+++ b/base/allocator/allocator_extension_thunks.h
@@ -5,6 +5,8 @@
#ifndef BASE_ALLOCATOR_ALLOCATOR_THUNKS_EXTENSION_H
#define BASE_ALLOCATOR_ALLOCATOR_THUNKS_EXTENSION_H
+#include <stddef.h> // for size_t
+
namespace base {
namespace allocator {
namespace thunks {
@@ -13,14 +15,18 @@ namespace thunks {
// new allocator extension from a specific allocator implementation to base.
// See allocator_extension.h to see the interface that base exports.
-typedef void GetStatsFunction(char*, int);
-void SetGetStatsFunction(GetStatsFunction* get_stats_function);
-GetStatsFunction* GetGetStatsFunction();
+typedef bool (*GetPropertyFunction)(const char* name, size_t* value);
+void SetGetPropertyFunction(GetPropertyFunction get_property_function);
+GetPropertyFunction GetGetPropertyFunction();
+
+typedef void (*GetStatsFunction)(char* buffer, int buffer_length);
+void SetGetStatsFunction(GetStatsFunction get_stats_function);
+GetStatsFunction GetGetStatsFunction();
-typedef void ReleaseFreeMemoryFunction();
+typedef void (*ReleaseFreeMemoryFunction)();
void SetReleaseFreeMemoryFunction(
- ReleaseFreeMemoryFunction* release_free_memory_function);
-ReleaseFreeMemoryFunction* GetReleaseFreeMemoryFunction();
+ ReleaseFreeMemoryFunction release_free_memory_function);
+ReleaseFreeMemoryFunction GetReleaseFreeMemoryFunction();
} // namespace thunks
} // namespace allocator
« no previous file with comments | « base/allocator/allocator_extension.cc ('k') | base/allocator/allocator_extension_thunks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698