SecondaryAllocator> Allocator;
static Allocator allocator;
+#if SANITIZER_WORDSIZE == 64
+static THREADLOCAL AllocatorCache allocator_cache;
+AllocatorCache *GetAllocatorCache() { return &allocator_cache; }
+#else // SANITIZER_WORDSIZE == 32
+// Try to fit into dynamic TLS region to be able to dlopen liblsan. Currently works
+// only for x32 archs.
static THREADLOCAL AllocatorCache *allocator_cache;
AllocatorCache *GetAllocatorCache() {
if (UNLIKELY(allocator_cache == nullptr)) {
}
return allocator_cache;
}
+#endif
void InitializeAllocator() {
SetAllocatorMayReturnNull(common_flags()->allocator_may_return_null);