Path: blob/main/contrib/llvm-project/compiler-rt/lib/msan/msan_allocator.h
35262 views
//===-- msan_allocator.h ----------------------------------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This file is a part of MemorySanitizer.9//10//===----------------------------------------------------------------------===//1112#ifndef MSAN_ALLOCATOR_H13#define MSAN_ALLOCATOR_H1415#include "sanitizer_common/sanitizer_common.h"1617namespace __msan {1819struct MsanThreadLocalMallocStorage {20// Allocator cache contains atomic_uint64_t which must be 8-byte aligned.21alignas(8) uptr allocator_cache[96 * (512 * 8 + 16)]; // Opaque.22void Init();23void CommitBack();2425private:26// These objects are allocated via mmap() and are zero-initialized.27MsanThreadLocalMallocStorage() {}28};2930void LockAllocator();31void UnlockAllocator();3233} // namespace __msan34#endif // MSAN_ALLOCATOR_H353637