From cc41b591b4c5f5a07b3e1a2282d5643075d31274 Mon Sep 17 00:00:00 2001 From: Cristian Cadar Date: Mon, 11 Mar 2019 10:37:09 +0000 Subject: Created a new memory management option category for the options in MemoryManager.cpp --- lib/Core/MemoryManager.cpp | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'lib') 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 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 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 - 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 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 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 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) -- cgit 1.4.1