]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/compiler-rt/lib/scudo/scudo_flags.inc
Merge compiler-rt trunk r321017 to contrib/compiler-rt.
[FreeBSD/FreeBSD.git] / contrib / compiler-rt / lib / scudo / scudo_flags.inc
1 //===-- scudo_flags.inc -----------------------------------------*- 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 /// Hardened Allocator runtime flags.
11 ///
12 //===----------------------------------------------------------------------===//
13
14 #ifndef SCUDO_FLAG
15 # error "Define SCUDO_FLAG prior to including this file!"
16 #endif
17
18 SCUDO_FLAG(int, QuarantineSizeMb, -1,
19            "Deprecated. Please use QuarantineSizeKb.")
20
21 // Default value is set in scudo_flags.cpp based on architecture.
22 SCUDO_FLAG(int, QuarantineSizeKb, -1,
23            "Size in KB of quarantine used to delay the actual deallocation of "
24            "chunks. Lower value may reduce memory usage but decrease the "
25            "effectiveness of the mitigation. Defaults to 64KB (32-bit) or "
26            "256KB (64-bit)")
27
28 // Default value is set in scudo_flags.cpp based on architecture.
29 SCUDO_FLAG(int, ThreadLocalQuarantineSizeKb, -1,
30           "Size in KB of per-thread cache used to offload the global "
31           "quarantine. Lower value may reduce memory usage but might increase "
32           "the contention on the global quarantine. Defaults to 16KB (32-bit) "
33           "or 64KB (64-bit)")
34
35 // Default value is set in scudo_flags.cpp based on architecture.
36 SCUDO_FLAG(int, QuarantineChunksUpToSize, -1,
37           "Size in bytes up to which chunks will be quarantined (if lower than"
38           "or equal to). Defaults to 256 (32-bit) or 2048 (64-bit)")
39
40 SCUDO_FLAG(bool, DeallocationTypeMismatch, true,
41           "Report errors on malloc/delete, new/free, new/delete[], etc.")
42
43 SCUDO_FLAG(bool, DeleteSizeMismatch, true,
44            "Report errors on mismatch between size of new and delete.")
45
46 SCUDO_FLAG(bool, ZeroContents, false,
47           "Zero chunk contents on allocation and deallocation.")