1 //===-- sanitizer/scudo_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 /// Public Scudo interface header.
11 //===----------------------------------------------------------------------===//
12 #ifndef SANITIZER_SCUDO_INTERFACE_H_
13 #define SANITIZER_SCUDO_INTERFACE_H_
15 #include <sanitizer/common_interface_defs.h>
20 // This function may be optionally provided by a user and should return
21 // a string containing Scudo runtime options. See scudo_flags.h for details.
22 const char* __scudo_default_options(void);
24 // This function allows to set the RSS limit at runtime. This can be either
25 // the hard limit (HardLimit=1) or the soft limit (HardLimit=0). The limit
26 // can be removed by setting LimitMb to 0. This function's parameters should
27 // be fully trusted to avoid security mishaps.
28 void __scudo_set_rss_limit(size_t LimitMb
, int HardLimit
);
30 // This function outputs various allocator statistics for both the Primary
31 // and Secondary allocators, including memory usage, number of allocations
33 void __scudo_print_stats(void);
38 #endif // SANITIZER_SCUDO_INTERFACE_H_