Path: blob/main/contrib/llvm-project/compiler-rt/include/sanitizer/scudo_interface.h
35235 views
//===-- sanitizer/scudo_interface.h -----------------------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8/// Public Scudo interface header.9//10//===----------------------------------------------------------------------===//11#ifndef SANITIZER_SCUDO_INTERFACE_H_12#define SANITIZER_SCUDO_INTERFACE_H_1314#include <sanitizer/common_interface_defs.h>1516#ifdef __cplusplus17extern "C" {18#endif19// This function may be optionally provided by a user and should return20// a string containing Scudo runtime options. See scudo_flags.h for details.21const char *SANITIZER_CDECL __scudo_default_options(void);2223// This function allows to set the RSS limit at runtime. This can be either24// the hard limit (HardLimit=1) or the soft limit (HardLimit=0). The limit25// can be removed by setting LimitMb to 0. This function's parameters should26// be fully trusted to avoid security mishaps.27void SANITIZER_CDECL __scudo_set_rss_limit(size_t LimitMb, int HardLimit);2829// This function outputs various allocator statistics for both the Primary30// and Secondary allocators, including memory usage, number of allocations31// and deallocations.32void SANITIZER_CDECL __scudo_print_stats(void);33#ifdef __cplusplus34} // extern "C"35#endif3637#endif // SANITIZER_SCUDO_INTERFACE_H_383940