summaryrefslogtreecommitdiff
path: root/src/mem/ruby/recorder/CacheRecorder.cc
diff options
context:
space:
mode:
authorJoel Hestness <jthestness@gmail.com>2013-04-07 20:31:15 -0500
committerJoel Hestness <jthestness@gmail.com>2013-04-07 20:31:15 -0500
commit3b02210713a3b8f46750638003784115a738ec78 (patch)
treed3787d1380716d3fdb03fc4c98b6bc8ebe3ac699 /src/mem/ruby/recorder/CacheRecorder.cc
parent7fb55b98cc63e8c08a198ae8bc9396ae96bfabe5 (diff)
downloadgem5-3b02210713a3b8f46750638003784115a738ec78.tar.xz
Ruby System, Cache Recorder: Use delete [] for trace vars
The cache trace variables are array allocated uint8_t* in the RubySystem and the Ruby CacheRecorder, but the code used delete to free the memory, resulting in Valgrind memory errors. Change these deletes to delete [] to get rid of the errors.
Diffstat (limited to 'src/mem/ruby/recorder/CacheRecorder.cc')
-rw-r--r--src/mem/ruby/recorder/CacheRecorder.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mem/ruby/recorder/CacheRecorder.cc b/src/mem/ruby/recorder/CacheRecorder.cc
index c5593d945..1e029b400 100644
--- a/src/mem/ruby/recorder/CacheRecorder.cc
+++ b/src/mem/ruby/recorder/CacheRecorder.cc
@@ -61,7 +61,7 @@ CacheRecorder::CacheRecorder(uint8_t* uncompressed_trace,
CacheRecorder::~CacheRecorder()
{
if (m_uncompressed_trace != NULL) {
- delete m_uncompressed_trace;
+ delete [] m_uncompressed_trace;
m_uncompressed_trace = NULL;
}
m_seq_map.clear();