summaryrefslogtreecommitdiff
path: root/src/mem/tport.hh
diff options
context:
space:
mode:
authorAli Saidi <Ali.Saidi@ARM.com>2012-06-07 10:59:03 -0400
committerAli Saidi <Ali.Saidi@ARM.com>2012-06-07 10:59:03 -0400
commitc80cd4136e3fec00c8448bc0dea20a65b182a259 (patch)
tree26e4649233c5236eb0b19a2f54ae020ae323c2cf /src/mem/tport.hh
parent7183c3fd56c4f0e8e4137795bb91dcaff312f591 (diff)
downloadgem5-c80cd4136e3fec00c8448bc0dea20a65b182a259.tar.xz
mem: Delay deleting of incoming packets by one call.
This patch is a temporary fix until Andreas' four-phase patches get reviewed and committed. Removing FastAlloc seems to have exposed an issue which previously was reasonable rare in which packets are freed before the sending cache is done with them. This change puts incoming packets no a pendingDelete queue which are deleted at the start of the next call and thus breaks the dependency between when the caller returns true and when the packet is actually used by the sending cache. Running valgrind on a multi-core linux boot and the memtester results in no valgrind warnings.
Diffstat (limited to 'src/mem/tport.hh')
-rw-r--r--src/mem/tport.hh8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mem/tport.hh b/src/mem/tport.hh
index db5a074fb..1f08d1a91 100644
--- a/src/mem/tport.hh
+++ b/src/mem/tport.hh
@@ -73,6 +73,14 @@ class SimpleTimingPort : public QueuedSlavePort
virtual Tick recvAtomic(PacketPtr pkt) = 0;
+ /**
+ * @todo this is a temporary workaround until the 4-phase code is committed.
+ * upstream caches need this packet until true is returned, so hold it for
+ * deletion until a subsequent call
+ */
+ std::vector<PacketPtr> pendingDelete;
+
+
public:
/**