klee
klee::MemoryManager Class Reference

#include <MemoryManager.h>

Collaboration diagram for klee::MemoryManager:

Public Member Functions

 MemoryManager (ArrayCache *arrayCache)
 
 ~MemoryManager ()
 
MemoryObjectallocate (uint64_t size, bool isLocal, bool isGlobal, const llvm::Value *allocSite, size_t alignment)
 
MemoryObjectallocateFixed (uint64_t address, uint64_t size, const llvm::Value *allocSite)
 
void deallocate (const MemoryObject *mo)
 
void markFreed (MemoryObject *mo)
 
ArrayCachegetArrayCache () 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
 

Detailed Description

Definition at line 25 of file MemoryManager.h.

Member Typedef Documentation

◆ objects_ty

typedef std::set<MemoryObject *> klee::MemoryManager::objects_ty
private

Definition at line 27 of file MemoryManager.h.

Constructor & Destructor Documentation

◆ MemoryManager()

MemoryManager::MemoryManager ( ArrayCache arrayCache)

Definition at line 62 of file MemoryManager.cpp.

References deterministicSpace, klee::klee_error(), klee::klee_message(), nextFreeSlot, and spaceSize.

Here is the call graph for this function:

◆ ~MemoryManager()

MemoryManager::~MemoryManager ( )

Member Function Documentation

◆ allocate()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ allocateFixed()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ deallocate()

void MemoryManager::deallocate ( const MemoryObject mo)

Definition at line 173 of file MemoryManager.cpp.

◆ getArrayCache()

ArrayCache * klee::MemoryManager::getArrayCache ( ) const
inline

Definition at line 49 of file MemoryManager.h.

References arrayCache.

◆ getUsedDeterministicSize()

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().

Here is the caller graph for this function:

◆ markFreed()

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().

Here is the caller graph for this function:

Member Data Documentation

◆ arrayCache

ArrayCache* const klee::MemoryManager::arrayCache
private

Definition at line 29 of file MemoryManager.h.

Referenced by getArrayCache().

◆ deterministicSpace

char* klee::MemoryManager::deterministicSpace
private

Definition at line 31 of file MemoryManager.h.

Referenced by allocate(), getUsedDeterministicSize(), MemoryManager(), and ~MemoryManager().

◆ nextFreeSlot

char* klee::MemoryManager::nextFreeSlot
private

Definition at line 32 of file MemoryManager.h.

Referenced by allocate(), getUsedDeterministicSize(), and MemoryManager().

◆ objects

objects_ty klee::MemoryManager::objects
private

Definition at line 28 of file MemoryManager.h.

Referenced by allocate(), allocateFixed(), markFreed(), and ~MemoryManager().

◆ spaceSize

size_t klee::MemoryManager::spaceSize
private

Definition at line 33 of file MemoryManager.h.

Referenced by allocate(), MemoryManager(), and ~MemoryManager().


The documentation for this class was generated from the following files: