Home | History | Annotate | Line # | Download | only in sanitizer
      1  1.1  kamil //===-- sanitizer/scudo_interface.h -----------------------------*- C++ -*-===//
      2  1.1  kamil //
      3  1.1  kamil //                     The LLVM Compiler Infrastructure
      4  1.1  kamil //
      5  1.1  kamil // This file is distributed under the University of Illinois Open Source
      6  1.1  kamil // License. See LICENSE.TXT for details.
      7  1.1  kamil //
      8  1.1  kamil //===----------------------------------------------------------------------===//
      9  1.1  kamil //
     10  1.1  kamil /// Public Scudo interface header.
     11  1.1  kamil //
     12  1.1  kamil //===----------------------------------------------------------------------===//
     13  1.1  kamil #ifndef SANITIZER_SCUDO_INTERFACE_H_
     14  1.1  kamil #define SANITIZER_SCUDO_INTERFACE_H_
     15  1.1  kamil 
     16  1.1  kamil #include <sanitizer/common_interface_defs.h>
     17  1.1  kamil 
     18  1.1  kamil #ifdef __cplusplus
     19  1.1  kamil extern "C" {
     20  1.1  kamil #endif
     21  1.1  kamil   // This function may be optionally provided by a user and should return
     22  1.1  kamil   // a string containing Scudo runtime options. See scudo_flags.h for details.
     23  1.1  kamil   const char* __scudo_default_options(void);
     24  1.1  kamil 
     25  1.1  kamil   // This function allows to set the RSS limit at runtime. This can be either
     26  1.1  kamil   // the hard limit (HardLimit=1) or the soft limit (HardLimit=0). The limit
     27  1.1  kamil   // can be removed by setting LimitMb to 0. This function's parameters should
     28  1.1  kamil   // be fully trusted to avoid security mishaps.
     29  1.1  kamil   void __scudo_set_rss_limit(size_t LimitMb, int HardLimit);
     30  1.1  kamil 
     31  1.1  kamil   // This function outputs various allocator statistics for both the Primary
     32  1.1  kamil   // and Secondary allocators, including memory usage, number of allocations
     33  1.1  kamil   // and deallocations.
     34  1.1  kamil   void __scudo_print_stats(void);
     35  1.1  kamil #ifdef __cplusplus
     36  1.1  kamil }  // extern "C"
     37  1.1  kamil #endif
     38  1.1  kamil 
     39  1.1  kamil #endif  // SANITIZER_SCUDO_INTERFACE_H_
     40