[AArch64] Fix SDNode type mismatches between *.td files and ISel (#116523)
[llvm-project.git] / compiler-rt / lib / msan / msan_allocator.h
blob109e24dc509a368e71fb49004372a56240258f04
1 //===-- msan_allocator.h ----------------------------------------*- C++ -*-===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file is a part of MemorySanitizer.
11 //===----------------------------------------------------------------------===//
13 #ifndef MSAN_ALLOCATOR_H
14 #define MSAN_ALLOCATOR_H
16 #include "sanitizer_common/sanitizer_common.h"
18 namespace __msan {
20 struct MsanThreadLocalMallocStorage {
21 // Allocator cache contains atomic_uint64_t which must be 8-byte aligned.
22 alignas(8) uptr allocator_cache[96 * (512 * 8 + 16)]; // Opaque.
23 void Init();
24 void CommitBack();
26 private:
27 // These objects are allocated via mmap() and are zero-initialized.
28 MsanThreadLocalMallocStorage() {}
31 void LockAllocator();
32 void UnlockAllocator();
34 } // namespace __msan
35 #endif // MSAN_ALLOCATOR_H