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

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

Issue 1505743002: Remove allocator_extension_thunks since this layer is not required (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@allocator_clean_win
Patch Set: rebase 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 | « 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
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"
11 #include "base/base_export.h" 10 #include "base/base_export.h"
12 #include "build/build_config.h" 11 #include "build/build_config.h"
13 12
14 namespace base { 13 namespace base {
15 namespace allocator { 14 namespace allocator {
16 15
16 typedef void (*ReleaseFreeMemoryFunction)();
17 typedef bool (*GetNumericPropertyFunction)(const char* name, size_t* value);
18
17 // Request that the allocator release any free memory it knows about to the 19 // Request that the allocator release any free memory it knows about to the
18 // system. 20 // system.
19 BASE_EXPORT void ReleaseFreeMemory(); 21 BASE_EXPORT void ReleaseFreeMemory();
20 22
23 // Get the named property's |value|. Returns true if the property is known.
24 // Returns false if the property is not a valid property name for the current
25 // allocator implementation.
26 // |name| or |value| cannot be NULL
27 BASE_EXPORT bool GetNumericProperty(const char* name, size_t* value);
28
21 // These settings allow specifying a callback used to implement the allocator 29 // These settings allow specifying a callback used to implement the allocator
22 // extension functions. These are optional, but if set they must only be set 30 // extension functions. These are optional, but if set they must only be set
23 // once. These will typically called in an allocator-specific initialization 31 // once. These will typically called in an allocator-specific initialization
24 // routine. 32 // routine.
25 // 33 //
26 // No threading promises are made. The caller is responsible for making sure 34 // No threading promises are made. The caller is responsible for making sure
27 // these pointers are set before any other threads attempt to call the above 35 // these pointers are set before any other threads attempt to call the above
28 // functions. 36 // functions.
29 37
30 BASE_EXPORT void SetReleaseFreeMemoryFunction( 38 BASE_EXPORT void SetReleaseFreeMemoryFunction(
31 thunks::ReleaseFreeMemoryFunction release_free_memory_function); 39 ReleaseFreeMemoryFunction release_free_memory_function);
32 40
33 BASE_EXPORT void SetGetNumericPropertyFunction( 41 BASE_EXPORT void SetGetNumericPropertyFunction(
34 thunks::GetNumericPropertyFunction get_numeric_property_function); 42 GetNumericPropertyFunction get_numeric_property_function);
35 43
36 } // namespace allocator 44 } // namespace allocator
37 } // namespace base 45 } // namespace base
38 46
39 #endif // BASE_ALLOCATOR_ALLOCATOR_EXTENSION_H_ 47 #endif // BASE_ALLOCATOR_ALLOCATOR_EXTENSION_H_
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