summaryrefslogtreecommitdiff
path: root/src/mem
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2009-11-18 16:33:35 -0800
committerBrad Beckmann <Brad.Beckmann@amd.com>2009-11-18 16:33:35 -0800
commit99338a7460ee495aa93009c33dec30c459680e42 (patch)
treeeaed38d61366d16f9c2e097a92f9803af86bab19 /src/mem
parent7ab484624faa4445f35333241c25159b352a0921 (diff)
downloadgem5-99338a7460ee495aa93009c33dec30c459680e42.tar.xz
ruby: fix CacheMemory destructor
Diffstat (limited to 'src/mem')
-rw-r--r--src/mem/ruby/system/CacheMemory.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mem/ruby/system/CacheMemory.cc b/src/mem/ruby/system/CacheMemory.cc
index 8d5ba3270..04adbcf69 100644
--- a/src/mem/ruby/system/CacheMemory.cc
+++ b/src/mem/ruby/system/CacheMemory.cc
@@ -98,6 +98,12 @@ CacheMemory::~CacheMemory()
{
if(m_replacementPolicy_ptr != NULL)
delete m_replacementPolicy_ptr;
+ delete m_profiler_ptr;
+ for (int i = 0; i < m_cache_num_sets; i++) {
+ for (int j = 0; j < m_cache_assoc; j++) {
+ delete m_cache[i][j];
+ }
+ }
}
void CacheMemory::printConfig(ostream& out)