1 //===-- scudo_flags.inc -----------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 /// Hardened Allocator runtime flags.
12 //===----------------------------------------------------------------------===//
15 # error "Define SCUDO_FLAG prior to including this file!"
18 SCUDO_FLAG(int, QuarantineSizeMb, -1,
19 "Deprecated. Please use QuarantineSizeKb.")
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 "
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) "
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)")
40 SCUDO_FLAG(bool, DeallocationTypeMismatch, true,
41 "Report errors on malloc/delete, new/free, new/delete[], etc.")
43 SCUDO_FLAG(bool, DeleteSizeMismatch, true,
44 "Report errors on mismatch between size of new and delete.")
46 SCUDO_FLAG(bool, ZeroContents, false,
47 "Zero chunk contents on allocation and deallocation.")