]>
Commit | Line | Data |
---|---|---|
b667dd70 | 1 | //=-- lsan_linux.cpp ------------------------------------------------------===// |
5d3805fc | 2 | // |
b667dd70 ML |
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 | |
5d3805fc JJ |
6 | // |
7 | //===----------------------------------------------------------------------===// | |
8 | // | |
3c6331c2 | 9 | // This file is a part of LeakSanitizer. Linux/NetBSD/Fuchsia-specific code. |
5d3805fc JJ |
10 | // |
11 | //===----------------------------------------------------------------------===// | |
12 | ||
13 | #include "sanitizer_common/sanitizer_platform.h" | |
14 | ||
3c6331c2 | 15 | #if SANITIZER_LINUX || SANITIZER_NETBSD || SANITIZER_FUCHSIA |
5d3805fc JJ |
16 | |
17 | #include "lsan_allocator.h" | |
18 | ||
19 | namespace __lsan { | |
20 | ||
21 | static THREADLOCAL u32 current_thread_tid = kInvalidTid; | |
22 | u32 GetCurrentThread() { return current_thread_tid; } | |
23 | void SetCurrentThread(u32 tid) { current_thread_tid = tid; } | |
24 | ||
25 | static THREADLOCAL AllocatorCache allocator_cache; | |
26 | AllocatorCache *GetAllocatorCache() { return &allocator_cache; } | |
27 | ||
28 | void ReplaceSystemMalloc() {} | |
29 | ||
30 | } // namespace __lsan | |
31 | ||
3c6331c2 | 32 | #endif // SANITIZER_LINUX || SANITIZER_NETBSD || SANITIZER_FUCHSIA |