packet: add a method to set the size

This commit is contained in:
Nathan Binkert 2010-03-12 17:31:08 -08:00
parent 671faf3316
commit c8f296bca0

View file

@ -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