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.
CacheRecorder::~CacheRecorder()
{
if (m_uncompressed_trace != NULL) {
- delete m_uncompressed_trace;
+ delete [] m_uncompressed_trace;
m_uncompressed_trace = NULL;
}
m_seq_map.clear();
memory_trace_size);
m_mem_vec_ptr->populatePages(uncompressed_trace);
- delete uncompressed_trace;
+ delete [] uncompressed_trace;
uncompressed_trace = NULL;
}