//===-- tsan_dense_alloc.h --------------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This file is a part of ThreadSanitizer (TSan), a race detector. // // A DenseSlabAlloc is a freelist-based allocator of fixed-size objects. // DenseSlabAllocCache is a thread-local cache for DenseSlabAlloc. // The only difference with traditional slab allocators is that DenseSlabAlloc // allocates/free indices of objects and provide a functionality to map // the index onto the real pointer. The index is u32, that is, 2 times smaller // than uptr (hense the Dense prefix). //===----------------------------------------------------------------------===// #ifndef TSAN_DENSE_ALLOC_H #define TSAN_DENSE_ALLOC_H #include "sanitizer_common/sanitizer_common.h" #include "tsan_defs.h" namespace __tsan { class DenseSlabAllocCache { … }; template <typename T, uptr kL1Size, uptr kL2Size, u64 kReserved = 0> class DenseSlabAlloc { … }; } // namespace __tsan #endif // TSAN_DENSE_ALLOC_H