From 3b02210713a3b8f46750638003784115a738ec78 Mon Sep 17 00:00:00 2001 From: Joel Hestness Date: Sun, 7 Apr 2013 20:31:15 -0500 Subject: 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. --- src/mem/ruby/recorder/CacheRecorder.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mem/ruby/recorder/CacheRecorder.cc') 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(); -- cgit v1.2.3