-----Original Message----- From: g...@cmdmail.amd.com [mailto:g...@cmdmail.amd.com] Sent: Monday, November 09, 2009 10:32 AM To: Beckmann, Brad Subject: [PATCH 11 of 31] ruby: Fixed Directory memory destructor
# HG changeset patch # User Brad Beckmann <brad.beckm...@amd.com> # Date 1257791382 28800 # Node ID 6aad467bbc1a93df1a8029aa0c8f845269092db9 # Parent b0e9060f3db69fa1ba3858ae0eb5b16e21b5a745 ruby: Fixed Directory memory destructor diff -r b0e9060f3db6 -r 6aad467bbc1a src/mem/ruby/system/DirectoryMemory.cc --- a/src/mem/ruby/system/DirectoryMemory.cc Mon Nov 09 10:29:42 2009 -0800 +++ b/src/mem/ruby/system/DirectoryMemory.cc Mon Nov 09 10:29:42 2009 -0800 @@ -84,11 +84,14 @@ DirectoryMemory::~DirectoryMemory() { // free up all the directory entries - for (int i=0;i<m_num_entries;i++) - if (m_entries[i] != NULL) - delete m_entries; - if (m_entries != NULL) + for (uint64 i=0;i<m_num_entries;i++) { + if (m_entries[i] != NULL) { + delete m_entries[i]; + } + } + if (m_entries != NULL) { delete [] m_entries; + } } void DirectoryMemory::printConfig(ostream& out) const _______________________________________________ m5-dev mailing list m5-dev@m5sim.org http://m5sim.org/mailman/listinfo/m5-dev