diff options
author | Brad Beckmann <Brad.Beckmann@amd.com> | 2009-11-18 16:33:35 -0800 |
---|---|---|
committer | Brad Beckmann <Brad.Beckmann@amd.com> | 2009-11-18 16:33:35 -0800 |
commit | 99338a7460ee495aa93009c33dec30c459680e42 (patch) | |
tree | eaed38d61366d16f9c2e097a92f9803af86bab19 /src/mem/ruby | |
parent | 7ab484624faa4445f35333241c25159b352a0921 (diff) | |
download | gem5-99338a7460ee495aa93009c33dec30c459680e42.tar.xz |
ruby: fix CacheMemory destructor
Diffstat (limited to 'src/mem/ruby')
-rw-r--r-- | src/mem/ruby/system/CacheMemory.cc | 6 |
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) |