1 //===-- interface.h ---------------------------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef SCUDO_INTERFACE_H_
10 #define SCUDO_INTERFACE_H_
12 #include "internal_defs.h"
16 WEAK INTERFACE const char *__scudo_default_options();
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);
23 WEAK INTERFACE void __scudo_print_stats(void);
25 typedef void (*iterate_callback)(uintptr_t base, size_t size, void *arg);
29 #endif // SCUDO_INTERFACE_H_