Delete packets when we're done with them.
authorSteve Reinhardt <stever@eecs.umich.edu>
Tue, 3 Jul 2007 04:40:31 +0000 (00:40 -0400)
committerSteve Reinhardt <stever@eecs.umich.edu>
Tue, 3 Jul 2007 04:40:31 +0000 (00:40 -0400)
--HG--
extra : convert_revision : b8894d26e1ca7a6c9b736500accdaa53bfb09558

src/mem/cache/cache_impl.hh

index 0d76b6bec4caf5b7704022664c951b959ebc0ca5..320e0be81ca5dc92bdc4c2ee1755a29b9a0d44b4 100644 (file)
@@ -705,6 +705,8 @@ Cache<TagStore>::handleResponse(PacketPtr pkt)
         deallocate = true;
     }
 
+    delete pkt;
+
     if (deallocate) {
         mq->deallocate(mshr);
         if (wasFull && !mq->isFull()) {
@@ -1242,6 +1244,9 @@ Cache<TagStore>::MemSidePort::sendPacket()
             waitingOnRetry = !success;
             if (waitingOnRetry) {
                 DPRINTF(CachePort, "now waiting on a retry\n");
+                if (!mshr->isSimpleForward()) {
+                    delete pkt;
+                }
             } else {
                 myCache()->markInService(mshr);
             }