scudo_interface.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. //===-- sanitizer/scudo_interface.h -----------------------------*- C++ -*-===//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is distributed under the University of Illinois Open Source
  6. // License. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. //
  10. /// Public Scudo interface header.
  11. //
  12. //===----------------------------------------------------------------------===//
  13. #ifndef SANITIZER_SCUDO_INTERFACE_H_
  14. #define SANITIZER_SCUDO_INTERFACE_H_
  15. #include <sanitizer/common_interface_defs.h>
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. // This function may be optionally provided by a user and should return
  20. // a string containing Scudo runtime options. See scudo_flags.h for details.
  21. const char* __scudo_default_options(void);
  22. // This function allows to set the RSS limit at runtime. This can be either
  23. // the hard limit (HardLimit=1) or the soft limit (HardLimit=0). The limit
  24. // can be removed by setting LimitMb to 0. This function's parameters should
  25. // be fully trusted to avoid security mishaps.
  26. void __scudo_set_rss_limit(unsigned long LimitMb, int HardLimit);
  27. #ifdef __cplusplus
  28. } // extern "C"
  29. #endif
  30. #endif // SANITIZER_SCUDO_INTERFACE_H_