summaryrefslogtreecommitdiff
path: root/src/mem/packet.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/packet.hh')
-rw-r--r--src/mem/packet.hh5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mem/packet.hh b/src/mem/packet.hh
index 19fff7e3a..bcf9d8d68 100644
--- a/src/mem/packet.hh
+++ b/src/mem/packet.hh
@@ -681,9 +681,9 @@ class Packet : public FastAlloc, public Printable
*/
template <typename T>
T*
- getPtr()
+ getPtr(bool null_ok = false)
{
- assert(flags.isSet(STATIC_DATA|DYNAMIC_DATA));
+ assert(null_ok || flags.isSet(STATIC_DATA|DYNAMIC_DATA));
return (T*)data;
}
@@ -768,7 +768,6 @@ class Packet : public FastAlloc, public Printable
data = new uint8_t[getSize()];
}
-
/**
* Check a functional request against a memory value represented
* by a base/size pair and an associated data array. If the