dfsan_allocator.h 927 B

123456789101112131415161718192021222324252627282930
  1. //===-- dfsan_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 DataflowSanitizer.
  10. //
  11. //===----------------------------------------------------------------------===//
  12. #ifndef DFSAN_ALLOCATOR_H
  13. #define DFSAN_ALLOCATOR_H
  14. #include "sanitizer_common/sanitizer_common.h"
  15. namespace __dfsan {
  16. struct DFsanThreadLocalMallocStorage {
  17. ALIGNED(8) uptr allocator_cache[96 * (512 * 8 + 16)]; // Opaque.
  18. void CommitBack();
  19. private:
  20. // These objects are allocated via mmap() and are zero-initialized.
  21. DFsanThreadLocalMallocStorage() {}
  22. };
  23. } // namespace __dfsan
  24. #endif // DFSAN_ALLOCATOR_H