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

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

Issue 1468033002: Remove unused memory functions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused functions from base/allocator Created 5 years, 1 month 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 the allocator to report value of its waste memory size.
18 // Waste size corresponds to memory that has been allocated from the OS but
19 // not passed up to the application. It e.g. includes memory retained by free
20 // lists, internal data, chunks padding, etc.
21 //
22 // |size| pointer to the returned value, must be not NULL.
23 // Returns true if the value has been returned, false otherwise.
24 BASE_EXPORT bool GetAllocatorWasteSize(size_t* size);
25
26 // Request that the allocator print a human-readable description of the current 17 // Request that the allocator print a human-readable description of the current
27 // state of the allocator into a null-terminated string in the memory segment 18 // state of the allocator into a null-terminated string in the memory segment
28 // buffer[0,buffer_length-1]. 19 // buffer[0,buffer_length-1].
29 // 20 //
30 // |buffer| must point to a valid piece of memory 21 // |buffer| must point to a valid piece of memory
31 // |buffer_length| must be > 0. 22 // |buffer_length| must be > 0.
32 BASE_EXPORT void GetStats(char* buffer, int buffer_length); 23 BASE_EXPORT void GetStats(char* buffer, int buffer_length);
33 24
34 // Request that the allocator release any free memory it knows about to the 25 // Request that the allocator release any free memory it knows about to the
35 // system. 26 // system.
36 BASE_EXPORT void ReleaseFreeMemory(); 27 BASE_EXPORT void ReleaseFreeMemory();
37 28
38 29
39 // These settings allow specifying a callback used to implement the allocator 30 // These settings allow specifying a callback used to implement the allocator
40 // extension functions. These are optional, but if set they must only be set 31 // extension functions. These are optional, but if set they must only be set
41 // once. These will typically called in an allocator-specific initialization 32 // once. These will typically called in an allocator-specific initialization
42 // routine. 33 // routine.
43 // 34 //
44 // No threading promises are made. The caller is responsible for making sure 35 // No threading promises are made. The caller is responsible for making sure
45 // these pointers are set before any other threads attempt to call the above 36 // these pointers are set before any other threads attempt to call the above
46 // functions. 37 // functions.
47 BASE_EXPORT void SetGetAllocatorWasteSizeFunction(
48 thunks::GetAllocatorWasteSizeFunction get_allocator_waste_size_function);
49 38
50 BASE_EXPORT void SetGetStatsFunction( 39 BASE_EXPORT void SetGetStatsFunction(
51 thunks::GetStatsFunction get_stats_function); 40 thunks::GetStatsFunction get_stats_function);
52 41
53 BASE_EXPORT void SetReleaseFreeMemoryFunction( 42 BASE_EXPORT void SetReleaseFreeMemoryFunction(
54 thunks::ReleaseFreeMemoryFunction release_free_memory_function); 43 thunks::ReleaseFreeMemoryFunction release_free_memory_function);
55 44
56 BASE_EXPORT void SetGetNumericPropertyFunction( 45 BASE_EXPORT void SetGetNumericPropertyFunction(
57 thunks::GetNumericPropertyFunction get_numeric_property_function); 46 thunks::GetNumericPropertyFunction get_numeric_property_function);
58 47
59 } // namespace allocator 48 } // namespace allocator
60 } // namespace base 49 } // namespace base
61 50
62 #endif // BASE_ALLOCATOR_ALLOCATOR_EXTENSION_H_ 51 #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