Ruby: Delete packet requests during warmup
authorJoel Hestness <jthestness@gmail.com>
Tue, 9 Apr 2013 21:25:29 +0000 (16:25 -0500)
committerJoel Hestness <jthestness@gmail.com>
Tue, 9 Apr 2013 21:25:29 +0000 (16:25 -0500)
When warming up caches in Ruby, the CacheRecorder sends fetch requests into
Ruby Sequencers with packet types that require responses. Since responses are
never generated for these CacheRecorder requests, the requests are not deleted
in the packet destructor called from the Ruby hit callback. Free the request.

src/mem/ruby/system/Sequencer.cc

index 5eacc976ad545741b6056c720887a7021eade21e..606dff0ab987fe0478130ec760585220aaf88cc3 100644 (file)
@@ -560,6 +560,8 @@ Sequencer::hitCallback(SequencerRequest* srequest,
     delete srequest;
 
     if (g_system_ptr->m_warmup_enabled) {
+        assert(pkt->req);
+        delete pkt->req;
         delete pkt;
         g_system_ptr->m_cache_recorder->enqueueNextFetchRequest();
     } else if (g_system_ptr->m_cooldown_enabled) {