projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ab4846
)
ruby: fix CacheMemory destructor
author
Brad Beckmann
<Brad.Beckmann@amd.com>
Thu, 19 Nov 2009 00:33:35 +0000
(16:33 -0800)
committer
Brad Beckmann
<Brad.Beckmann@amd.com>
Thu, 19 Nov 2009 00:33:35 +0000
(16:33 -0800)
src/mem/ruby/system/CacheMemory.cc
patch
|
blob
|
history
diff --git
a/src/mem/ruby/system/CacheMemory.cc
b/src/mem/ruby/system/CacheMemory.cc
index 8d5ba3270fd9eea6c5747f61f2006a1b4e800cc9..04adbcf696bb4d2aa1a295e9381edcd37bed7ffc 100644
(file)
--- 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)