1//===-- interface.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#ifndef SCUDO_INTERFACE_H_
10#define SCUDO_INTERFACE_H_
11
12#include "internal_defs.h"
13
14extern "C" {
15
16WEAK INTERFACE const char *__scudo_default_options();
17
18// Post-allocation & pre-deallocation hooks.
19// They must be thread-safe and not use heap related functions.
20WEAK INTERFACE void __scudo_allocate_hook(void *ptr, size_t size);
21WEAK INTERFACE void __scudo_deallocate_hook(void *ptr);
22
23WEAK INTERFACE void __scudo_print_stats(void);
24
25typedef void (*iterate_callback)(uintptr_t base, size_t size, void *arg);
26
27} // extern "C"
28
29#endif // SCUDO_INTERFACE_H_
30