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

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

Issue 2676093003: mac: Hook up allocator shim during app startup. (Closed)
Patch Set: Comments from primiano. Created 3 years, 10 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_SHIM_H_ 5 #ifndef BASE_ALLOCATOR_ALLOCATOR_SHIM_H_
6 #define BASE_ALLOCATOR_ALLOCATOR_SHIM_H_ 6 #define BASE_ALLOCATOR_ALLOCATOR_SHIM_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/base_export.h" 10 #include "base/base_export.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 BASE_EXPORT void InsertAllocatorDispatch(AllocatorDispatch* dispatch); 107 BASE_EXPORT void InsertAllocatorDispatch(AllocatorDispatch* dispatch);
108 108
109 // Test-only. Rationale: (1) lack of use cases; (2) dealing safely with a 109 // Test-only. Rationale: (1) lack of use cases; (2) dealing safely with a
110 // removal of arbitrary elements from a singly linked list would require a lock 110 // removal of arbitrary elements from a singly linked list would require a lock
111 // in malloc(), which we really don't want. 111 // in malloc(), which we really don't want.
112 BASE_EXPORT void RemoveAllocatorDispatchForTesting(AllocatorDispatch* dispatch); 112 BASE_EXPORT void RemoveAllocatorDispatchForTesting(AllocatorDispatch* dispatch);
113 113
114 #if defined(OS_MACOSX) 114 #if defined(OS_MACOSX)
115 // On macOS, the allocator shim needs to be turned on during runtime. 115 // On macOS, the allocator shim needs to be turned on during runtime.
116 BASE_EXPORT void InitializeAllocatorShim(); 116 BASE_EXPORT void InitializeAllocatorShim();
117
118 extern bool g_is_mac_shim_layer_initialized;
Primiano Tucci (use gerrit) 2017/02/07 11:58:08 see comment above, I don't think we need this
erikchen 2017/02/09 23:49:04 Done.
117 #endif // defined(OS_MACOSX) 119 #endif // defined(OS_MACOSX)
118 120
119 } // namespace allocator 121 } // namespace allocator
120 } // namespace base 122 } // namespace base
121 123
122 #endif // BASE_ALLOCATOR_ALLOCATOR_SHIM_H_ 124 #endif // BASE_ALLOCATOR_ALLOCATOR_SHIM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698