From: Andreas Hansson Date: Mon, 18 Mar 2013 09:22:45 +0000 (-0400) Subject: mem: Fix missing delete of packet in DRAM access X-Git-Tag: stable_2013_06_16~56 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c01c5e971b020f106fa528bc2e41d4d3bd2cf640;p=gem5.git mem: Fix missing delete of packet in DRAM access This patch fixes a memory leak caused by not deleting packets that require no response. --- diff --git a/src/mem/simple_dram.cc b/src/mem/simple_dram.cc index 90517ec62..0b24b4056 100644 --- a/src/mem/simple_dram.cc +++ b/src/mem/simple_dram.cc @@ -739,6 +739,9 @@ SimpleDRAM::accessAndRespond(PacketPtr pkt) // next tick port.schedTimingResp(pkt, curTick() + 1); } else { + // @todo the packet is going to be deleted, and the DRAMPacket + // is still having a pointer to it + pendingDelete.push_back(pkt); } DPRINTF(DRAM, "Done\n");