brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 37fd7bf Raw
39 lines · c
1//===-- sanitizer/scudo_interface.h -----------------------------*- C++ -*-===//2//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-exception6//7//===----------------------------------------------------------------------===//8//9/// Public Scudo interface header.10//11//===----------------------------------------------------------------------===//12#ifndef SANITIZER_SCUDO_INTERFACE_H_13#define SANITIZER_SCUDO_INTERFACE_H_14 15#include <sanitizer/common_interface_defs.h>16 17#ifdef __cplusplus18extern "C" {19#endif20// This function may be optionally provided by a user and should return21// a string containing Scudo runtime options. See scudo_flags.h for details.22const char *SANITIZER_CDECL __scudo_default_options(void);23 24// This function allows to set the RSS limit at runtime. This can be either25// the hard limit (HardLimit=1) or the soft limit (HardLimit=0). The limit26// can be removed by setting LimitMb to 0. This function's parameters should27// be fully trusted to avoid security mishaps.28void SANITIZER_CDECL __scudo_set_rss_limit(size_t LimitMb, int HardLimit);29 30// This function outputs various allocator statistics for both the Primary31// and Secondary allocators, including memory usage, number of allocations32// and deallocations.33void SANITIZER_CDECL __scudo_print_stats(void);34#ifdef __cplusplus35} // extern "C"36#endif37 38#endif // SANITIZER_SCUDO_INTERFACE_H_39