From: Steve Reinhardt Date: Tue, 3 Jul 2007 04:40:31 +0000 (-0400) Subject: Delete packets when we're done with them. X-Git-Tag: m5_2.0_beta4~195^2~50^2~13 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4738649e32d06d92e6792b7ce80fcbd05627fc06;p=gem5.git Delete packets when we're done with them. --HG-- extra : convert_revision : b8894d26e1ca7a6c9b736500accdaa53bfb09558 --- diff --git a/src/mem/cache/cache_impl.hh b/src/mem/cache/cache_impl.hh index 0d76b6bec..320e0be81 100644 --- a/src/mem/cache/cache_impl.hh +++ b/src/mem/cache/cache_impl.hh @@ -705,6 +705,8 @@ Cache::handleResponse(PacketPtr pkt) deallocate = true; } + delete pkt; + if (deallocate) { mq->deallocate(mshr); if (wasFull && !mq->isFull()) { @@ -1242,6 +1244,9 @@ Cache::MemSidePort::sendPacket() waitingOnRetry = !success; if (waitingOnRetry) { DPRINTF(CachePort, "now waiting on a retry\n"); + if (!mshr->isSimpleForward()) { + delete pkt; + } } else { myCache()->markInService(mshr); }