1*490215a3Smrg //=-- lsan_linux.cc -------------------------------------------------------===//
2*490215a3Smrg //
3*490215a3Smrg // This file is distributed under the University of Illinois Open Source
4*490215a3Smrg // License. See LICENSE.TXT for details.
5*490215a3Smrg //
6*490215a3Smrg //===----------------------------------------------------------------------===//
7*490215a3Smrg //
8*490215a3Smrg // This file is a part of LeakSanitizer. Linux/NetBSD-specific code.
9*490215a3Smrg //
10*490215a3Smrg //===----------------------------------------------------------------------===//
11*490215a3Smrg 
12*490215a3Smrg #include "sanitizer_common/sanitizer_platform.h"
13*490215a3Smrg 
14*490215a3Smrg #if SANITIZER_LINUX || SANITIZER_NETBSD
15*490215a3Smrg 
16*490215a3Smrg #include "lsan_allocator.h"
17*490215a3Smrg 
18*490215a3Smrg namespace __lsan {
19*490215a3Smrg 
20*490215a3Smrg static THREADLOCAL u32 current_thread_tid = kInvalidTid;
GetCurrentThread()21*490215a3Smrg u32 GetCurrentThread() { return current_thread_tid; }
SetCurrentThread(u32 tid)22*490215a3Smrg void SetCurrentThread(u32 tid) { current_thread_tid = tid; }
23*490215a3Smrg 
24*490215a3Smrg static THREADLOCAL AllocatorCache allocator_cache;
GetAllocatorCache()25*490215a3Smrg AllocatorCache *GetAllocatorCache() { return &allocator_cache; }
26*490215a3Smrg 
ReplaceSystemMalloc()27*490215a3Smrg void ReplaceSystemMalloc() {}
28*490215a3Smrg 
29*490215a3Smrg } // namespace __lsan
30*490215a3Smrg 
31*490215a3Smrg #endif  // SANITIZER_LINUX || SANITIZER_NETBSD
32