| OLD | NEW |
| 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
| 2 /* This Source Code Form is subject to the terms of the Mozilla Public | 2 /* This Source Code Form is subject to the terms of the Mozilla Public |
| 3 * License, v. 2.0. If a copy of the MPL was not distributed with this | 3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
| 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
| 5 | 5 |
| 6 #ifndef plarena_h___ | 6 #ifndef plarena_h___ |
| 7 #define plarena_h___ | 7 #define plarena_h___ |
| 8 /* | 8 /* |
| 9 * Lifetime-based fast allocation, inspired by much prior art, including | 9 * Lifetime-based fast allocation, inspired by much prior art, including |
| 10 * "Fast Allocation and Deallocation of Memory Based on Object Lifetimes" | 10 * "Fast Allocation and Deallocation of Memory Based on Object Lifetimes" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 #define PL_SANITIZE_ADDRESS 1 | 89 #define PL_SANITIZE_ADDRESS 1 |
| 90 #endif | 90 #endif |
| 91 #elif defined(__SANITIZE_ADDRESS__) | 91 #elif defined(__SANITIZE_ADDRESS__) |
| 92 #define PL_SANITIZE_ADDRESS 1 | 92 #define PL_SANITIZE_ADDRESS 1 |
| 93 #endif | 93 #endif |
| 94 | 94 |
| 95 #if defined(PL_SANITIZE_ADDRESS) | 95 #if defined(PL_SANITIZE_ADDRESS) |
| 96 | 96 |
| 97 /* These definitions are usually provided through the | 97 /* These definitions are usually provided through the |
| 98 * sanitizer/asan_interface.h header installed by ASan. | 98 * sanitizer/asan_interface.h header installed by ASan. |
| 99 * See https://code.google.com/p/address-sanitizer/wiki/ManualPoisoning | 99 * See https://github.com/google/sanitizers/wiki/AddressSanitizerManualPoisoning |
| 100 */ | 100 */ |
| 101 | 101 |
| 102 void __asan_poison_memory_region(void const volatile *addr, size_t size); | 102 PR_IMPORT(void) __asan_poison_memory_region(void const volatile *addr, size_t si
ze); |
| 103 void __asan_unpoison_memory_region(void const volatile *addr, size_t size); | 103 PR_IMPORT(void) __asan_unpoison_memory_region(void const volatile *addr, size_t
size); |
| 104 | 104 |
| 105 #define PL_MAKE_MEM_NOACCESS(addr, size) \ | 105 #define PL_MAKE_MEM_NOACCESS(addr, size) \ |
| 106 __asan_poison_memory_region((addr), (size)) | 106 __asan_poison_memory_region((addr), (size)) |
| 107 | 107 |
| 108 #define PL_MAKE_MEM_UNDEFINED(addr, size) \ | 108 #define PL_MAKE_MEM_UNDEFINED(addr, size) \ |
| 109 __asan_unpoison_memory_region((addr), (size)) | 109 __asan_unpoison_memory_region((addr), (size)) |
| 110 | 110 |
| 111 #define PL_MAKE_MEM_DEFINED(addr, size) \ | 111 #define PL_MAKE_MEM_DEFINED(addr, size) \ |
| 112 __asan_unpoison_memory_region((addr), (size)) | 112 __asan_unpoison_memory_region((addr), (size)) |
| 113 | 113 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 #define PL_ArenaCountInplaceGrowth(ap, size, incr) /* nothing */ | 249 #define PL_ArenaCountInplaceGrowth(ap, size, incr) /* nothing */ |
| 250 #define PL_ArenaCountGrowth(ap, size, incr) /* nothing */ | 250 #define PL_ArenaCountGrowth(ap, size, incr) /* nothing */ |
| 251 #define PL_ArenaCountRelease(ap, mark) /* nothing */ | 251 #define PL_ArenaCountRelease(ap, mark) /* nothing */ |
| 252 #define PL_ArenaCountRetract(ap, mark) /* nothing */ | 252 #define PL_ArenaCountRetract(ap, mark) /* nothing */ |
| 253 | 253 |
| 254 #endif /* !PL_ARENAMETER */ | 254 #endif /* !PL_ARENAMETER */ |
| 255 | 255 |
| 256 PR_END_EXTERN_C | 256 PR_END_EXTERN_C |
| 257 | 257 |
| 258 #endif /* plarena_h___ */ | 258 #endif /* plarena_h___ */ |
| OLD | NEW |