llvm/compiler-rt/lib/lsan/lsan_malloc_mac.cpp

//===-- lsan_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 LeakSanitizer (LSan), a memory leak detector.
//
// Mac-specific malloc interception.
//===----------------------------------------------------------------------===//

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

#include "lsan.h"
#include "lsan_allocator.h"
#include "lsan_thread.h"

using namespace __lsan;
#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 // SANITIZER_APPLE