From: Kevin Lim Date: Tue, 3 Apr 2007 18:25:24 +0000 (-0400) Subject: Fix a memory leak. Hopefully this fixes the longer running benchmarks. X-Git-Tag: m5_2.0_beta3~45^2~5^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=98c8cd0b36c31a30229d408ddb9e397e8d1364fe;p=gem5.git Fix a memory leak. Hopefully this fixes the longer running benchmarks. --HG-- extra : convert_revision : 89eff82642ff181a9b95c77c4d2bf620ca837113 --- diff --git a/src/cpu/o3/lsq_unit_impl.hh b/src/cpu/o3/lsq_unit_impl.hh index 0a3021046..493144919 100644 --- a/src/cpu/o3/lsq_unit_impl.hh +++ b/src/cpu/o3/lsq_unit_impl.hh @@ -57,6 +57,11 @@ LSQUnit::WritebackEvent::process() if (!lsqPtr->isSwitchedOut()) { lsqPtr->writeback(inst, pkt); } + + if (pkt->senderState) + delete pkt->senderState; + + delete pkt->req; delete pkt; } @@ -80,10 +85,6 @@ LSQUnit::completeDataAccess(PacketPtr pkt) if (isSwitchedOut() || inst->isSquashed()) { iewStage->decrWb(inst->seqNum); - delete state; - delete pkt->req; - delete pkt; - return; } else { if (!state->noWB) { writeback(inst, pkt);