xref: /aosp_15_r20/external/compiler-rt/lib/scudo/scudo_flags.inc (revision 7c3d14c8b49c529e04be81a3ce6f5cc23712e4c6)
1*7c3d14c8STreehugger Robot//===-- scudo_flags.inc -----------------------------------------*- C++ -*-===//
2*7c3d14c8STreehugger Robot//
3*7c3d14c8STreehugger Robot//                     The LLVM Compiler Infrastructure
4*7c3d14c8STreehugger Robot//
5*7c3d14c8STreehugger Robot// This file is distributed under the University of Illinois Open Source
6*7c3d14c8STreehugger Robot// License. See LICENSE.TXT for details.
7*7c3d14c8STreehugger Robot//
8*7c3d14c8STreehugger Robot//===----------------------------------------------------------------------===//
9*7c3d14c8STreehugger Robot///
10*7c3d14c8STreehugger Robot/// Hardened Allocator runtime flags.
11*7c3d14c8STreehugger Robot///
12*7c3d14c8STreehugger Robot//===----------------------------------------------------------------------===//
13*7c3d14c8STreehugger Robot
14*7c3d14c8STreehugger Robot#ifndef SCUDO_FLAG
15*7c3d14c8STreehugger Robot# error "Define SCUDO_FLAG prior to including this file!"
16*7c3d14c8STreehugger Robot#endif
17*7c3d14c8STreehugger Robot
18*7c3d14c8STreehugger RobotSCUDO_FLAG(int, QuarantineSizeMb, 64,
19*7c3d14c8STreehugger Robot           "Size (in Mb) of quarantine used to delay the actual deallocation "
20*7c3d14c8STreehugger Robot           "of chunks. Lower value may reduce memory usage but decrease the "
21*7c3d14c8STreehugger Robot           "effectiveness of the mitigation.")
22*7c3d14c8STreehugger Robot
23*7c3d14c8STreehugger RobotSCUDO_FLAG(int, ThreadLocalQuarantineSizeKb, 1024,
24*7c3d14c8STreehugger Robot          "Size (in Kb) of per-thread cache used to offload the global "
25*7c3d14c8STreehugger Robot          "quarantine. Lower value may reduce memory usage but might increase "
26*7c3d14c8STreehugger Robot          "the contention on the global quarantine.")
27*7c3d14c8STreehugger Robot
28*7c3d14c8STreehugger RobotSCUDO_FLAG(bool, DeallocationTypeMismatch, true,
29*7c3d14c8STreehugger Robot          "Report errors on malloc/delete, new/free, new/delete[], etc.")
30*7c3d14c8STreehugger Robot
31*7c3d14c8STreehugger RobotSCUDO_FLAG(bool, DeleteSizeMismatch, true,
32*7c3d14c8STreehugger Robot           "Report errors on mismatch between size of new and delete.")
33*7c3d14c8STreehugger Robot
34*7c3d14c8STreehugger RobotSCUDO_FLAG(bool, ZeroContents, false,
35*7c3d14c8STreehugger Robot          "Zero chunk contents on allocation and deallocation.")
36