1 //=-- lsan_linux.cc -------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // This file is a part of LeakSanitizer. Linux/NetBSD-specific code.
11 //===----------------------------------------------------------------------===//
13 #include "sanitizer_common/sanitizer_platform.h"
15 #if SANITIZER_LINUX || SANITIZER_NETBSD
17 #include "lsan_allocator.h"
21 static THREADLOCAL u32 current_thread_tid = kInvalidTid;
22 u32 GetCurrentThread() { return current_thread_tid; }
23 void SetCurrentThread(u32 tid) { current_thread_tid = tid; }
25 static THREADLOCAL AllocatorCache allocator_cache;
26 AllocatorCache *GetAllocatorCache() { return &allocator_cache; }
28 void ReplaceSystemMalloc() {}
32 #endif // SANITIZER_LINUX || SANITIZER_NETBSD