summaryrefslogtreecommitdiff
path: root/src/mem/ruby/system/System.cc
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2010-03-21 21:22:21 -0700
committerBrad Beckmann <Brad.Beckmann@amd.com>2010-03-21 21:22:21 -0700
commit92cfd1cac7f6f2d0abf64808f08f063cd0db1263 (patch)
treea69a2964f7342083cd8aaca5ed32df207a1edea8 /src/mem/ruby/system/System.cc
parentb5e4c3cbf2de32e18029b44b16b307a773b6ecf7 (diff)
downloadgem5-92cfd1cac7f6f2d0abf64808f08f063cd0db1263.tar.xz
ruby: Ruby support for sparse memory
The patch includes direct support for the MI example protocol.
Diffstat (limited to 'src/mem/ruby/system/System.cc')
-rw-r--r--src/mem/ruby/system/System.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mem/ruby/system/System.cc b/src/mem/ruby/system/System.cc
index 9f5ec9f09..105f6fb36 100644
--- a/src/mem/ruby/system/System.cc
+++ b/src/mem/ruby/system/System.cc
@@ -76,7 +76,11 @@ RubySystem::RubySystem(const Params *p)
m_block_size_bits = log_int(m_block_size_bytes);
m_memory_size_bytes = p->mem_size;
- m_memory_size_bits = log_int(m_memory_size_bytes);
+ if (m_memory_size_bytes == 0) {
+ m_memory_size_bits = 0;
+ } else {
+ m_memory_size_bits = log_int(m_memory_size_bytes);
+ }
m_network_ptr = p->network;
g_debug_ptr = p->debug;
@@ -104,7 +108,10 @@ void RubySystem::init()
RubySystem::~RubySystem()
{
-
+ delete m_network_ptr;
+ delete m_profiler_ptr;
+ delete m_tracer_ptr;
+ delete m_mem_vec_ptr;
}
void RubySystem::printSystemConfig(ostream & out)