]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/compiler-rt/lib/scudo/standalone/interface.h
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / compiler-rt / lib / scudo / standalone / interface.h
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
14 extern "C" {
15
16 WEAK 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.
20 WEAK INTERFACE void __scudo_allocate_hook(void *ptr, size_t size);
21 WEAK INTERFACE void __scudo_deallocate_hook(void *ptr);
22
23 WEAK INTERFACE void __scudo_print_stats(void);
24
25 typedef void (*iterate_callback)(uintptr_t base, size_t size, void *arg);
26
27 } // extern "C"
28
29 #endif // SCUDO_INTERFACE_H_