From: Brad Beckmann Date: Thu, 19 Nov 2009 00:33:35 +0000 (-0800) Subject: ruby: fix CacheMemory destructor X-Git-Tag: stable_2012_02_02~1575^2~36 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=99338a7460ee495aa93009c33dec30c459680e42;p=gem5.git ruby: fix CacheMemory destructor --- 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)