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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/allocator/allocator_extension.cc ('k') | base/allocator/allocator_extension_thunks.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
9
8 namespace base { 10 namespace base {
9 namespace allocator { 11 namespace allocator {
10 namespace thunks { 12 namespace thunks {
11 13
12 // 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
13 // new allocator extension from a specific allocator implementation to base. 15 // new allocator extension from a specific allocator implementation to base.
14 // See allocator_extension.h to see the interface that base exports. 16 // See allocator_extension.h to see the interface that base exports.
15 17
16 typedef void GetStatsFunction(char*, int); 18 typedef bool (*GetPropertyFunction)(const char* name, size_t* value);
17 void SetGetStatsFunction(GetStatsFunction* get_stats_function); 19 void SetGetPropertyFunction(GetPropertyFunction get_property_function);
18 GetStatsFunction* GetGetStatsFunction(); 20 GetPropertyFunction GetGetPropertyFunction();
19 21
20 typedef void ReleaseFreeMemoryFunction(); 22 typedef void (*GetStatsFunction)(char* buffer, int buffer_length);
23 void SetGetStatsFunction(GetStatsFunction get_stats_function);
24 GetStatsFunction GetGetStatsFunction();
25
26 typedef void (*ReleaseFreeMemoryFunction)();
21 void SetReleaseFreeMemoryFunction( 27 void SetReleaseFreeMemoryFunction(
22 ReleaseFreeMemoryFunction* release_free_memory_function); 28 ReleaseFreeMemoryFunction release_free_memory_function);
23 ReleaseFreeMemoryFunction* GetReleaseFreeMemoryFunction(); 29 ReleaseFreeMemoryFunction GetReleaseFreeMemoryFunction();
24 30
25 } // namespace thunks 31 } // namespace thunks
26 } // namespace allocator 32 } // namespace allocator
27 } // namespace base 33 } // namespace base
28 34
29 #endif 35 #endif
OLDNEW
« 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