summaryrefslogtreecommitdiff
path: root/src/cpu/o3/lsq_unit_impl.hh
diff options
context:
space:
mode:
authorKevin Lim <ktlim@umich.edu>2007-04-03 14:25:24 -0400
committerKevin Lim <ktlim@umich.edu>2007-04-03 14:25:24 -0400
commit98c8cd0b36c31a30229d408ddb9e397e8d1364fe (patch)
tree0f9857bd1bba9e960ae9bdf2be69ef889681454b /src/cpu/o3/lsq_unit_impl.hh
parentec09e5ad6f7c0af6ebb10ee85b326155e2f26cd5 (diff)
downloadgem5-98c8cd0b36c31a30229d408ddb9e397e8d1364fe.tar.xz
Fix a memory leak. Hopefully this fixes the longer running benchmarks.
--HG-- extra : convert_revision : 89eff82642ff181a9b95c77c4d2bf620ca837113
Diffstat (limited to 'src/cpu/o3/lsq_unit_impl.hh')
-rw-r--r--src/cpu/o3/lsq_unit_impl.hh9
1 files 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<Impl>::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<Impl>::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);