From c01c5e971b020f106fa528bc2e41d4d3bd2cf640 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Mon, 18 Mar 2013 05:22:45 -0400 Subject: [PATCH] mem: Fix missing delete of packet in DRAM access This patch fixes a memory leak caused by not deleting packets that require no response. --- src/mem/simple_dram.cc | 3 +++ 1 file changed, 3 insertions(+) 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"); -- 2.30.2