ruby: Ruby destruction fix.
This commit is contained in:
@@ -45,7 +45,11 @@ class DataBlock {
|
||||
}
|
||||
|
||||
// Destructor
|
||||
~DataBlock() { if(m_alloc) delete [] m_data;}
|
||||
~DataBlock() {
|
||||
if(m_alloc) {
|
||||
delete [] m_data;
|
||||
}
|
||||
}
|
||||
|
||||
DataBlock& operator=(const DataBlock& obj);
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
NetDest& operator=(const Set& obj);
|
||||
|
||||
// Destructor
|
||||
// ~NetDest();
|
||||
~NetDest() { DEBUG_MSG(MEMORY_COMP, LowPrio, "NetDest Destructor"); }
|
||||
|
||||
// Public Methods
|
||||
void add(MachineID newElement);
|
||||
|
||||
@@ -124,7 +124,7 @@ SimpleNetwork::~SimpleNetwork()
|
||||
}
|
||||
m_switch_ptr_vector.deletePointers();
|
||||
m_buffers_to_free.deletePointers();
|
||||
delete m_topology_ptr;
|
||||
// delete m_topology_ptr;
|
||||
}
|
||||
|
||||
// From a switch to an endpoint node
|
||||
|
||||
@@ -60,7 +60,7 @@ RubyMemory::RubyMemory(const Params *p)
|
||||
|
||||
vector<RubyObjConf> sys_conf;
|
||||
while (!config.eof()) {
|
||||
char buffer[4096];
|
||||
char buffer[65536];
|
||||
config.getline(buffer, sizeof(buffer));
|
||||
string line = buffer;
|
||||
if (line.empty())
|
||||
@@ -119,8 +119,8 @@ RubyMemory::init()
|
||||
}
|
||||
|
||||
//Print stats at exit
|
||||
RubyExitCallback* rc = new RubyExitCallback(this);
|
||||
registerExitCallback(rc);
|
||||
rubyExitCB = new RubyExitCallback(this);
|
||||
registerExitCallback(rubyExitCB);
|
||||
|
||||
//Sched RubyEvent, automatically reschedules to advance ruby cycles
|
||||
rubyTickEvent = new RubyEvent(this);
|
||||
@@ -138,6 +138,7 @@ RubyMemory::tick()
|
||||
|
||||
RubyMemory::~RubyMemory()
|
||||
{
|
||||
delete g_system_ptr;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -40,6 +40,8 @@
|
||||
#include "mem/ruby/system/RubyPort.hh"
|
||||
#include "params/RubyMemory.hh"
|
||||
|
||||
class RubyExitCallback;
|
||||
|
||||
class RubyMemory : public PhysicalMemory
|
||||
{
|
||||
public:
|
||||
@@ -119,6 +121,7 @@ class RubyMemory : public PhysicalMemory
|
||||
private:
|
||||
Tick ruby_clock;
|
||||
Tick ruby_phase;
|
||||
RubyExitCallback* rubyExitCB;
|
||||
|
||||
public:
|
||||
static std::map<int64_t, PacketPtr> pending_requests;
|
||||
|
||||
Reference in New Issue
Block a user