blob: f180478fdac38b13f628608c343e2cd30d1396d3 [file] [log] [blame]
Kostya Serebryanya8e71542016-06-07 01:20:26 +00001//===-- 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
Kostya Kortchinsky044cfea2017-02-03 20:49:42 +000018SCUDO_FLAG(int, QuarantineSizeMb, -1,
Kostya Kortchinsky5884a662017-07-24 15:29:38 +000019 "Deprecated. Please use QuarantineSizeKb.")
20
21// Default value is set in scudo_flags.cpp based on architecture.
22SCUDO_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)")
Kostya Serebryanya8e71542016-06-07 01:20:26 +000027
Kostya Kortchinsky044cfea2017-02-03 20:49:42 +000028// Default value is set in scudo_flags.cpp based on architecture.
29SCUDO_FLAG(int, ThreadLocalQuarantineSizeKb, -1,
Kostya Kortchinsky5884a662017-07-24 15:29:38 +000030 "Size in KB of per-thread cache used to offload the global "
Kostya Serebryanya8e71542016-06-07 01:20:26 +000031 "quarantine. Lower value may reduce memory usage but might increase "
Kostya Kortchinsky5884a662017-07-24 15:29:38 +000032 "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.
36SCUDO_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)")
Kostya Serebryanya8e71542016-06-07 01:20:26 +000039
40SCUDO_FLAG(bool, DeallocationTypeMismatch, true,
41 "Report errors on malloc/delete, new/free, new/delete[], etc.")
42
43SCUDO_FLAG(bool, DeleteSizeMismatch, true,
44 "Report errors on mismatch between size of new and delete.")
45
46SCUDO_FLAG(bool, ZeroContents, false,
47 "Zero chunk contents on allocation and deallocation.")