diff options
author | Derek Hower <drh5@cs.wisc.edu> | 2010-01-19 15:48:12 -0600 |
---|---|---|
committer | Derek Hower <drh5@cs.wisc.edu> | 2010-01-19 15:48:12 -0600 |
commit | 279f179babc9e5663156777c533c06edc91bce9a (patch) | |
tree | e6718ee514cc81678491b50562ce8c463c0b20fd /src/mem/ruby/system/DirectoryMemory.cc | |
parent | 5aa104e072eb20f6aca49b169521b0c2da33c844 (diff) | |
parent | 295516a590b6e47c9a881f193027447e500c749c (diff) | |
download | gem5-279f179babc9e5663156777c533c06edc91bce9a.tar.xz |
merge
Diffstat (limited to 'src/mem/ruby/system/DirectoryMemory.cc')
-rw-r--r-- | src/mem/ruby/system/DirectoryMemory.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mem/ruby/system/DirectoryMemory.cc b/src/mem/ruby/system/DirectoryMemory.cc index 46ebdbab4..9b2a3873c 100644 --- a/src/mem/ruby/system/DirectoryMemory.cc +++ b/src/mem/ruby/system/DirectoryMemory.cc @@ -84,11 +84,14 @@ void DirectoryMemory::init(const vector<string> & argv) 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 |