| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |