1 //===-- sanitizer/scudo_interface.h -----------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 /// Public Scudo interface header.
12 //===----------------------------------------------------------------------===//
13 #ifndef SANITIZER_SCUDO_INTERFACE_H_
14 #define SANITIZER_SCUDO_INTERFACE_H_
16 #include <sanitizer/common_interface_defs.h>
21 // This function may be optionally provided by a user and should return
22 // a string containing Scudo runtime options. See scudo_flags.h for details.
23 const char* __scudo_default_options(void);
25 // This function allows to set the RSS limit at runtime. This can be either
26 // the hard limit (HardLimit=1) or the soft limit (HardLimit=0). The limit
27 // can be removed by setting LimitMb to 0. This function's parameters should
28 // be fully trusted to avoid security mishaps.
29 void __scudo_set_rss_limit(size_t LimitMb, int HardLimit);
31 // This function outputs various allocator statistics for both the Primary
32 // and Secondary allocators, including memory usage, number of allocations
34 void __scudo_print_stats(void);
39 #endif // SANITIZER_SCUDO_INTERFACE_H_