From c8f296bca08a34947cf020046964a888b66acbb5 Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Fri, 12 Mar 2010 17:31:08 -0800 Subject: packet: add a method to set the size --- src/mem/packet.hh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/mem') diff --git a/src/mem/packet.hh b/src/mem/packet.hh index c58862270..e7a5335a8 100644 --- a/src/mem/packet.hh +++ b/src/mem/packet.hh @@ -590,6 +590,15 @@ class Packet : public FastAlloc, public Printable setDest(Broadcast); } + void + setSize(unsigned size) + { + assert(!flags.isSet(VALID_SIZE)); + + this->size = size; + flags.set(VALID_SIZE); + } + /** * Set the data pointer to the following value that should not be -- cgit v1.2.3