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

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

Issue 1468993003: [Eraser] Remove chrome://tcmalloc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address primiano comment, remove declaration from gpu_child_thread Created 5 years 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
« no previous file with comments | « no previous file | 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
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_H_ 5 #ifndef BASE_ALLOCATOR_ALLOCATOR_EXTENSION_H_
6 #define BASE_ALLOCATOR_ALLOCATOR_EXTENSION_H_ 6 #define BASE_ALLOCATOR_ALLOCATOR_EXTENSION_H_
7 7
8 #include <stddef.h> // for size_t 8 #include <stddef.h> // for size_t
9 9
10 #include "base/allocator/allocator_extension_thunks.h" 10 #include "base/allocator/allocator_extension_thunks.h"
11 #include "base/base_export.h" 11 #include "base/base_export.h"
12 #include "build/build_config.h" 12 #include "build/build_config.h"
13 13
14 namespace base { 14 namespace base {
15 namespace allocator { 15 namespace allocator {
16 16
17 // Request that the allocator print a human-readable description of the current
18 // state of the allocator into a null-terminated string in the memory segment
19 // buffer[0,buffer_length-1].
20 //
21 // |buffer| must point to a valid piece of memory
22 // |buffer_length| must be > 0.
23 BASE_EXPORT void GetStats(char* buffer, int buffer_length);
24
25 // Request that the allocator release any free memory it knows about to the 17 // Request that the allocator release any free memory it knows about to the
26 // system. 18 // system.
27 BASE_EXPORT void ReleaseFreeMemory(); 19 BASE_EXPORT void ReleaseFreeMemory();
28 20
29
30 // These settings allow specifying a callback used to implement the allocator 21 // These settings allow specifying a callback used to implement the allocator
31 // extension functions. These are optional, but if set they must only be set 22 // extension functions. These are optional, but if set they must only be set
32 // once. These will typically called in an allocator-specific initialization 23 // once. These will typically called in an allocator-specific initialization
33 // routine. 24 // routine.
34 // 25 //
35 // No threading promises are made. The caller is responsible for making sure 26 // No threading promises are made. The caller is responsible for making sure
36 // these pointers are set before any other threads attempt to call the above 27 // these pointers are set before any other threads attempt to call the above
37 // functions. 28 // functions.
38 29
39 BASE_EXPORT void SetGetStatsFunction(
40 thunks::GetStatsFunction get_stats_function);
41
42 BASE_EXPORT void SetReleaseFreeMemoryFunction( 30 BASE_EXPORT void SetReleaseFreeMemoryFunction(
43 thunks::ReleaseFreeMemoryFunction release_free_memory_function); 31 thunks::ReleaseFreeMemoryFunction release_free_memory_function);
44 32
45 BASE_EXPORT void SetGetNumericPropertyFunction( 33 BASE_EXPORT void SetGetNumericPropertyFunction(
46 thunks::GetNumericPropertyFunction get_numeric_property_function); 34 thunks::GetNumericPropertyFunction get_numeric_property_function);
47 35
48 } // namespace allocator 36 } // namespace allocator
49 } // namespace base 37 } // namespace base
50 38
51 #endif // BASE_ALLOCATOR_ALLOCATOR_EXTENSION_H_ 39 #endif // BASE_ALLOCATOR_ALLOCATOR_EXTENSION_H_
OLDNEW
« no previous file with comments | « no previous file | base/allocator/allocator_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698