#ifndef BUILD_SANITIZERS_SANITIZER_SHARED_HOOKS_H_
#define BUILD_SANITIZERS_SANITIZER_SHARED_HOOKS_H_
#include "build/build_config.h"
#if defined(ADDRESS_SANITIZER)
#include <cstddef>
#if defined(WIN32)
#if defined(SANITIZERS_IMPLEMENTATION)
#define SANITIZERS_EXPORT __declspec(dllexport)
#else
#define SANITIZERS_EXPORT __declspec(dllimport)
#endif
#else
#define SANITIZERS_EXPORT __attribute__((visibility("default"), noinline))
#endif
typedef void (*SanitizerMallocHook)(const volatile void*, size_t);
typedef void (*SanitizerFreeHook)(const volatile void*);
typedef int (*SanitizerIgnoreFreeHook)(const volatile void*);
namespace build_sanitizers {
SANITIZERS_EXPORT void InstallSanitizerHooks(SanitizerMallocHook,
SanitizerFreeHook,
SanitizerIgnoreFreeHook);
SANITIZERS_EXPORT void UninstallSanitizerHooks();
SANITIZERS_EXPORT void RunSanitizerMallocHook(const volatile void*, size_t);
SANITIZERS_EXPORT void RunSanitizerFreeHook(const volatile void*);
SANITIZERS_EXPORT int RunSanitizerIgnoreFreeHook(const volatile void*);
}
#endif
#endif