summaryrefslogtreecommitdiff
path: root/lib/lsan/lsan_common_linux.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lsan/lsan_common_linux.cc')
-rw-r--r--lib/lsan/lsan_common_linux.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/lsan/lsan_common_linux.cc b/lib/lsan/lsan_common_linux.cc
index 0e10d4191..e73768e58 100644
--- a/lib/lsan/lsan_common_linux.cc
+++ b/lib/lsan/lsan_common_linux.cc
@@ -22,6 +22,7 @@
#include "sanitizer_common/sanitizer_flags.h"
#include "sanitizer_common/sanitizer_linux.h"
#include "sanitizer_common/sanitizer_stackdepot.h"
+#include "lsan_allocator.h"
namespace __lsan {
@@ -38,6 +39,9 @@ static THREADLOCAL u32 current_thread_tid = kInvalidTid;
u32 GetCurrentThread() { return current_thread_tid; }
void SetCurrentThread(u32 tid) { current_thread_tid = tid; }
+static THREADLOCAL AllocatorCache allocator_cache;
+AllocatorCache *GetAllocatorCache() { return &allocator_cache; }
+
__attribute__((tls_model("initial-exec")))
THREADLOCAL int disable_counter;
bool DisabledInThisThread() { return disable_counter > 0; }