40 void*
declare_var(
const std::string& declaration,
void* suppliedAllocation = NULL);
64 void clear_var(
const std::string& var_name);
144 std::shared_ptr<const DataType>
getDataTypeOf(
const std::string& name);
155 void do_write_checkpoint(std::ostream& outStream, std::vector<AllocInfo*>& dependencies);
157 void* do_declare_var(
const std::string& abstract_declarator,
158 const std::string& variable_name,
159 void * supplied_allocation);
161 void delete_allocation(
AllocInfo * allocInfo);
163 unsigned int debugLevel;
170 pthread_mutex_t allocInfoMapMutex;
172 std::map<void*, AllocInfo*> allocInfoByAddressMap;
173 std::map<std::string, AllocInfo*> allocInfoByNameMap;
Definition: AllocInfo.hpp:33
Definition: NewCheckpointAgentBase.hpp:13
Register and manage datatypes at runtime.
Definition: DataTypeInator.hpp:16
Keep track of allocations and their type.
Definition: MemoryManager.hpp:18
MemoryManager(const MemoryManager &other)=delete
AllocInfo * getAllocInfoNamed(const std::string &name)
Get the AllocInfo with the given name.
Definition: MemoryManager.cpp:256
void setCheckPointAgent(CheckpointAgentBase *agent)
Set the CheckPointAgent.
Definition: MemoryManager.cpp:226
void * declare_var(const std::string &declaration, void *suppliedAllocation=NULL)
Declare a new allocation of given type with the memory manager.
Definition: MemoryManager.cpp:64
bool var_exists(const std::string &var_name)
Check if a variable is registered with the memory manager.
Definition: MemoryManager.cpp:75
std::shared_ptr< const DataType > getDataTypeOf(const std::string &name)
Get the DataType of the given variable.
Definition: MemoryManager.cpp:268
void delete_var(void *address)
Delete the variable.
Definition: MemoryManager.cpp:115
void clear_var(void *address)
Clear the value at the given address, if it is registered with the memorymanager.
Definition: MemoryManager.cpp:87
AllocInfo * getAllocInfoOf(void *address)
Get the AllocInfo that contains the given address.
Definition: MemoryManager.cpp:232
void restore_checkpoint(const std::string &filename)
Restore a checkpoint from file with given name.
Definition: MemoryManager.cpp:181
void clear_all_vars()
Clear all variables registered with the memory manager.
Definition: MemoryManager.cpp:109
MemoryManager(DataTypeInator *dataTypeInator)
Construct a new Memory Manager.
Definition: MemoryManager.cpp:16
AllocInfo * getAllocInfoAt(void *address)
Get the AllocInfo that starts at the given address.
Definition: MemoryManager.cpp:245
~MemoryManager()
Definition: MemoryManager.cpp:23
void write_checkpoint(std::ostream &out_s)
Write checkpoint to an output stream.
Definition: MemoryManager.cpp:159