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

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

Issue 2713553002: mac: Periodically shim new malloc zones immediately after startup. (Closed)
Patch Set: Rebase. 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
« no previous file with comments | « no previous file | base/allocator/allocator_interception_mac.mm » ('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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_INTERCEPTION_MAC_H_ 5 #ifndef BASE_ALLOCATOR_ALLOCATOR_INTERCEPTION_MAC_H_
6 #define BASE_ALLOCATOR_ALLOCATOR_INTERCEPTION_MAC_H_ 6 #define BASE_ALLOCATOR_ALLOCATOR_INTERCEPTION_MAC_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 17 matching lines...) Expand all
28 28
29 // Calls the original implementation of malloc/calloc prior to interception. 29 // Calls the original implementation of malloc/calloc prior to interception.
30 bool UncheckedMallocMac(size_t size, void** result); 30 bool UncheckedMallocMac(size_t size, void** result);
31 bool UncheckedCallocMac(size_t num_items, size_t size, void** result); 31 bool UncheckedCallocMac(size_t num_items, size_t size, void** result);
32 32
33 // Intercepts calls to default and purgeable malloc zones. Intercepts Core 33 // Intercepts calls to default and purgeable malloc zones. Intercepts Core
34 // Foundation and Objective-C allocations. 34 // Foundation and Objective-C allocations.
35 // Has no effect on the default malloc zone if the allocator shim already 35 // Has no effect on the default malloc zone if the allocator shim already
36 // performs that interception. 36 // performs that interception.
37 BASE_EXPORT void InterceptAllocationsMac(); 37 BASE_EXPORT void InterceptAllocationsMac();
38
39 // Periodically checks for, and shims new malloc zones.
Mark Mentovai 2017/02/23 02:26:17 This has an expiration date on it, which is kind o
erikchen 2017/04/03 06:44:41 Done.
40 BASE_EXPORT void PeriodicallyShimNewMallocZones();
Mark Mentovai 2017/02/23 02:26:17 And this one only does what it says if a certain c
Primiano Tucci (use gerrit) 2017/02/23 14:41:57 +1, or alternatively you can move the cmdline chec
erikchen 2017/04/03 06:44:41 I did what primiano suggested.
41
38 } // namespace allocator 42 } // namespace allocator
39 } // namespace base 43 } // namespace base
40 44
41 #endif // BASE_ALLOCATOR_ALLOCATOR_INTERCEPTION_MAC_H_ 45 #endif // BASE_ALLOCATOR_ALLOCATOR_INTERCEPTION_MAC_H_
OLDNEW
« no previous file with comments | « no previous file | base/allocator/allocator_interception_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698