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

Side by Side Diff: base/allocator/allocator_extension.h

Issue 10239012: Route calls to tcmalloc MallocExtension through allocator agnostic interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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.gyp ('k') | base/allocator/allocator_extension.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef BASE_ALLOCATOR_ALLOCATOR_EXTENSION_H
6 #define BASE_ALLOCATOR_ALLOCATOR_EXTENSION_H
7 #pragma once
8
9 #include "base/allocator/allocator_extension_thunks.h"
10 #include "base/base_export.h"
11 #include "build/build_config.h"
12
13 namespace base {
14 namespace allocator {
15
16 // Request that the allocator print a human-readable description of the current
17 // state of the allocator into a null-terminated string in the memory segment
18 // buffer[0,buffer_length-1].
19 //
20 // |buffer| must point to a valid piece of memory
21 // |buffer_length| must be > 0.
22 BASE_EXPORT void GetStats(char* buffer, int buffer_length);
23
24 // Request that the allocator release any free memory it knows about to the
25 // system.
26 BASE_EXPORT void ReleaseFreeMemory();
27
28
29 // These settings allow specifying a callback used to implement the allocator
30 // extension functions. These are optional, but if set they must only be set
31 // once. These will typically called in an allocator-specific initialization
32 // routine.
33 //
34 // No threading promises are made. The caller is responsible for making sure
35 // these pointers are set before any other threads attempt to call the above
36 // functions.
37 BASE_EXPORT void SetGetStatsFunction(
38 thunks::GetStatsFunction* get_stats_function);
39
40 BASE_EXPORT void SetReleaseFreeMemoryFunction(
41 thunks::ReleaseFreeMemoryFunction* release_free_memory_function);
42 } // namespace allocator
43 } // namespace base
44
45 #endif
OLDNEW
« no previous file with comments | « base/allocator/allocator.gyp ('k') | base/allocator/allocator_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698