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

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

Issue 2703803004: macOS: Shim all malloc zones. (Closed)
Patch Set: Minor formatting. 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 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 #ifdef BASE_ALLOCATOR_ALLOCATOR_SHIM_OVERRIDE_MAC_SYMBOLS_H_ 5 #ifdef BASE_ALLOCATOR_ALLOCATOR_SHIM_OVERRIDE_MAC_SYMBOLS_H_
6 #error This header is meant to be included only once by allocator_shim.cc 6 #error This header is meant to be included only once by allocator_shim.cc
7 #endif 7 #endif
8 #define BASE_ALLOCATOR_ALLOCATOR_SHIM_OVERRIDE_MAC_SYMBOLS_H_ 8 #define BASE_ALLOCATOR_ALLOCATOR_SHIM_OVERRIDE_MAC_SYMBOLS_H_
9 9
10 #include "base/allocator/allocator_interception_mac.h" 10 #include "base/allocator/allocator_interception_mac.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 }; 46 };
47 new_functions.memalign = [](malloc_zone_t* zone, size_t alignment, 47 new_functions.memalign = [](malloc_zone_t* zone, size_t alignment,
48 size_t size) -> void* { 48 size_t size) -> void* {
49 return ShimMemalign(alignment, size, zone); 49 return ShimMemalign(alignment, size, zone);
50 }; 50 };
51 new_functions.free_definite_size = [](malloc_zone_t* zone, void* ptr, 51 new_functions.free_definite_size = [](malloc_zone_t* zone, void* ptr,
52 size_t size) { 52 size_t size) {
53 ShimFreeDefiniteSize(ptr, size, zone); 53 ShimFreeDefiniteSize(ptr, size, zone);
54 }; 54 };
55 55
56 base::allocator::ReplaceFunctionsForDefaultZone(&new_functions); 56 base::allocator::ReplaceFunctionsForStoredZones(&new_functions);
57 } 57 }
58 58
59 } // namespace allocator 59 } // namespace allocator
60 } // namespace base 60 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698