klee
|
#include <MemoryManager.h>
Public Member Functions | |
MemoryManager (ArrayCache *arrayCache) | |
~MemoryManager () | |
MemoryObject * | allocate (uint64_t size, bool isLocal, bool isGlobal, const llvm::Value *allocSite, size_t alignment) |
MemoryObject * | allocateFixed (uint64_t address, uint64_t size, const llvm::Value *allocSite) |
void | deallocate (const MemoryObject *mo) |
void | markFreed (MemoryObject *mo) |
ArrayCache * | getArrayCache () const |
size_t | getUsedDeterministicSize () |
Private Types | |
typedef std::set< MemoryObject * > | objects_ty |
Private Attributes | |
objects_ty | objects |
ArrayCache *const | arrayCache |
char * | deterministicSpace |
char * | nextFreeSlot |
size_t | spaceSize |
Definition at line 25 of file MemoryManager.h.
|
private |
Definition at line 27 of file MemoryManager.h.
MemoryManager::MemoryManager | ( | ArrayCache * | arrayCache | ) |
Definition at line 62 of file MemoryManager.cpp.
References deterministicSpace, klee::klee_error(), klee::klee_message(), nextFreeSlot, and spaceSize.
MemoryManager::~MemoryManager | ( | ) |
Definition at line 86 of file MemoryManager.cpp.
References klee::MemoryObject::address, deterministicSpace, klee::MemoryObject::isFixed, objects, and spaceSize.
MemoryObject * MemoryManager::allocate | ( | uint64_t | size, |
bool | isLocal, | ||
bool | isGlobal, | ||
const llvm::Value * | allocSite, | ||
size_t | alignment | ||
) |
Returns memory object which contains a handle to real virtual process memory.
Definition at line 99 of file MemoryManager.cpp.
References klee::stats::allocations, deterministicSpace, klee::klee_warning(), klee::klee_warning_once(), nextFreeSlot, objects, and spaceSize.
Referenced by klee::Executor::allocateGlobalObjects(), klee::Executor::executeAlloc(), klee::Executor::executeCall(), klee::Executor::runFunctionAsMain(), and klee::Executor::serializeLandingpad().
MemoryObject * MemoryManager::allocateFixed | ( | uint64_t | address, |
uint64_t | size, | ||
const llvm::Value * | allocSite | ||
) |
Definition at line 155 of file MemoryManager.cpp.
References klee::MemoryObject::address, klee::stats::allocations, klee::klee_error(), objects, and klee::MemoryObject::size.
Referenced by klee::Executor::addExternalObject().
void MemoryManager::deallocate | ( | const MemoryObject * | mo | ) |
Definition at line 173 of file MemoryManager.cpp.
|
inline |
Definition at line 49 of file MemoryManager.h.
References arrayCache.
size_t MemoryManager::getUsedDeterministicSize | ( | ) |
Definition at line 183 of file MemoryManager.cpp.
References deterministicSpace, and nextFreeSlot.
Referenced by klee::Executor::checkMemoryUsage(), and klee::StatsTracker::writeStatsLine().
void MemoryManager::markFreed | ( | MemoryObject * | mo | ) |
Definition at line 175 of file MemoryManager.cpp.
References klee::MemoryObject::address, klee::MemoryObject::isFixed, and objects.
Referenced by klee::MemoryObject::~MemoryObject().
|
private |
Definition at line 29 of file MemoryManager.h.
Referenced by getArrayCache().
|
private |
Definition at line 31 of file MemoryManager.h.
Referenced by allocate(), getUsedDeterministicSize(), MemoryManager(), and ~MemoryManager().
|
private |
Definition at line 32 of file MemoryManager.h.
Referenced by allocate(), getUsedDeterministicSize(), and MemoryManager().
|
private |
Definition at line 28 of file MemoryManager.h.
Referenced by allocate(), allocateFixed(), markFreed(), and ~MemoryManager().
|
private |
Definition at line 33 of file MemoryManager.h.
Referenced by allocate(), MemoryManager(), and ~MemoryManager().