[llvm-commits] CVS: llvm/include/llvm/Reoptimizer/MemoryManager.h
Anand Shukla
ashukla at cs.uiuc.edu
Thu Jul 10 14:01:04 PDT 2003
Changes in directory llvm/include/llvm/Reoptimizer:
MemoryManager.h updated: 1.2 -> 1.3
---
Log message:
Some cleanup, and some additions for new trace framework
---
Diffs of the changes:
Index: llvm/include/llvm/Reoptimizer/MemoryManager.h
diff -u llvm/include/llvm/Reoptimizer/MemoryManager.h:1.2 llvm/include/llvm/Reoptimizer/MemoryManager.h:1.3
--- llvm/include/llvm/Reoptimizer/MemoryManager.h:1.2 Tue Sep 17 12:19:00 2002
+++ llvm/include/llvm/Reoptimizer/MemoryManager.h Thu Jul 10 14:00:39 2003
@@ -34,13 +34,21 @@
class MemoryManager{
private:
uint64_t memStart, memEnd;
+ unsigned int memorySize;
std::list<std::pair<uint64_t, uint64_t> > freeMemList;
public:
//Memory management
+ //Ctor: using default memory manager function as space
MemoryManager(); //Constructor
+ //make sure memsize is < number of instructions in dumyFunc
+ MemoryManager(unsigned int memSize); //Constructor
- int getMemSize(){ return globalMemSize; }
+ //Ctor: Using user provided function for space. The size of memory
+ //is assumed as memSize. Must ensure the provided function >= memSize bytes
+ MemoryManager(int (*dfunc)(int), unsigned int memSize);
+
+ int getMemSize(){ return memorySize; }
uint64_t getMemory(int sz); //return a pointer to memory of size sz
void freeTraceMemory(uint64_t toRemove, int size);//size is no if instructions
};
More information about the llvm-commits
mailing list