forked from OSchip/llvm-project
Summary: Secondary backed allocations do not require a cache. While it's not necessary an issue when each thread has its cache, it becomes one with a shared pool of caches (Android), as a Secondary backed allocation or deallocation holds a cache that could be useful to another thread doing a Primary backed allocation. We introduce an additional PRNG and its mutex (to avoid contention with the Fallback one for Primary allocations) that will provide the `Salt` needed for Secondary backed allocations. I changed some of the code in a way that feels more readable to me (eg: using some values directly rather than going through ternary assigned variables, using directly `true`/`false` rather than `FromPrimary`). I will let reviewers decide if it actually is. An additional change is to mark `CheckForCallocOverflow` as `UNLIKELY`. Reviewers: alekseyshl Reviewed By: alekseyshl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35358 llvm-svn: 307958 |
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| scudo_allocator.cpp | ||
| scudo_allocator.h | ||
| scudo_allocator_combined.h | ||
| scudo_allocator_secondary.h | ||
| scudo_crc32.cpp | ||
| scudo_crc32.h | ||
| scudo_flags.cpp | ||
| scudo_flags.h | ||
| scudo_flags.inc | ||
| scudo_interceptors.cpp | ||
| scudo_new_delete.cpp | ||
| scudo_termination.cpp | ||
| scudo_tls.h | ||
| scudo_tls_android.cpp | ||
| scudo_tls_android.inc | ||
| scudo_tls_context_android.inc | ||
| scudo_tls_context_linux.inc | ||
| scudo_tls_linux.cpp | ||
| scudo_tls_linux.inc | ||
| scudo_utils.cpp | ||
| scudo_utils.h | ||