From 98c8cd0b36c31a30229d408ddb9e397e8d1364fe Mon Sep 17 00:00:00 2001 From: Kevin Lim Date: Tue, 3 Apr 2007 14:25:24 -0400 Subject: [PATCH] Fix a memory leak. Hopefully this fixes the longer running benchmarks. --HG-- extra : convert_revision : 89eff82642ff181a9b95c77c4d2bf620ca837113 --- src/cpu/o3/lsq_unit_impl.hh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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);