llvm/compiler-rt/lib/tsan/rtl/tsan_malloc_mac.cpp

//===-- tsan_malloc_mac.cpp -----------------------------------------------===//
//
// 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.
//
// Mac-specific malloc interception.
//===----------------------------------------------------------------------===//

#include "sanitizer_common/sanitizer_platform.h"
#if SANITIZER_APPLE

#include "sanitizer_common/sanitizer_errno.h"
#include "tsan_interceptors.h"
#include "tsan_stack_trace.h"
#include "tsan_mman.h"

using namespace __tsan;
#define COMMON_MALLOC_ZONE_NAME
#define COMMON_MALLOC_ENTER
#define COMMON_MALLOC_SANITIZER_INITIALIZED
#define COMMON_MALLOC_FORCE_LOCK
#define COMMON_MALLOC_FORCE_UNLOCK
#define COMMON_MALLOC_MEMALIGN
#define COMMON_MALLOC_MALLOC
#define COMMON_MALLOC_REALLOC
#define COMMON_MALLOC_CALLOC
#define COMMON_MALLOC_POSIX_MEMALIGN
#define COMMON_MALLOC_VALLOC
#define COMMON_MALLOC_FREE
#define COMMON_MALLOC_SIZE
#define COMMON_MALLOC_FILL_STATS
#define COMMON_MALLOC_REPORT_UNKNOWN_REALLOC
#define COMMON_MALLOC_NAMESPACE
#define COMMON_MALLOC_HAS_ZONE_ENUMERATOR
#define COMMON_MALLOC_HAS_EXTRA_INTROSPECTION_INIT

#include "sanitizer_common/sanitizer_malloc_mac.inc"

#endif