diff options
author | Cristian Cadar <c.cadar@imperial.ac.uk> | 2019-03-11 10:37:09 +0000 |
---|---|---|
committer | MartinNowack <martin.nowack@gmail.com> | 2019-03-13 10:25:33 +0000 |
commit | cc41b591b4c5f5a07b3e1a2282d5643075d31274 (patch) | |
tree | ac04bdb2abeddb7d54e63d89e3d5a61417f62045 /lib/Core | |
parent | 03fc6c0bb53492d89b89b2657e6b80011ade33e4 (diff) | |
download | klee-cc41b591b4c5f5a07b3e1a2282d5643075d31274.tar.gz |
Created a new memory management option category for the options in MemoryManager.cpp
Diffstat (limited to 'lib/Core')
-rw-r--r-- | lib/Core/MemoryManager.cpp | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/lib/Core/MemoryManager.cpp b/lib/Core/MemoryManager.cpp index f40e8bc9..b8762c65 100644 --- a/lib/Core/MemoryManager.cpp +++ b/lib/Core/MemoryManager.cpp @@ -23,35 +23,38 @@ using namespace klee; namespace { + +llvm::cl::OptionCategory MemoryCat("Memory management options", + "These options control memory management."); + llvm::cl::opt<bool> DeterministicAllocation( "allocate-determ", - llvm::cl::desc("Allocate memory deterministically(default=off)"), - llvm::cl::init(false)); + llvm::cl::desc("Allocate memory deterministically (default=off)"), + llvm::cl::init(false), llvm::cl::cat(MemoryCat)); llvm::cl::opt<unsigned> DeterministicAllocationSize( "allocate-determ-size", llvm::cl::desc( "Preallocated memory for deterministic allocation in MB (default=100)"), - llvm::cl::init(100)); + llvm::cl::init(100), llvm::cl::cat(MemoryCat)); -llvm::cl::opt<bool> - NullOnZeroMalloc("return-null-on-zero-malloc", - llvm::cl::desc("Returns NULL in case malloc(size) was " - "called with size 0 (default=off)."), - llvm::cl::init(false)); +llvm::cl::opt<bool> NullOnZeroMalloc( + "return-null-on-zero-malloc", + llvm::cl::desc("Returns NULL if malloc(0) is called (default=off)"), + llvm::cl::init(false), llvm::cl::cat(MemoryCat)); llvm::cl::opt<unsigned> RedZoneSpace( "red-zone-space", llvm::cl::desc("Set the amount of free space between allocations. This is " - "important to detect out-of-bound accesses (default=10)."), - llvm::cl::init(10)); + "important to detect out-of-bounds accesses (default=10)"), + llvm::cl::init(10), llvm::cl::cat(MemoryCat)); llvm::cl::opt<unsigned long long> DeterministicStartAddress( "allocate-determ-start-address", llvm::cl::desc("Start address for deterministic allocation. Has to be page " - "aligned (default=0x7ff30000000)."), - llvm::cl::init(0x7ff30000000)); -} + "aligned (default=0x7ff30000000)"), + llvm::cl::init(0x7ff30000000), llvm::cl::cat(MemoryCat)); +} // namespace /***/ MemoryManager::MemoryManager(ArrayCache *_arrayCache) |