params: Get rid of the remnants of the old style parameter configuration stuff.
[gem5.git] / src / mem / packet.hh
index 05442b36982c6a2b6fe0c4d0a764b5e714fab370..36aff5b42eabf4d58a7eb1ac68f862be17ba37d1 100644 (file)
@@ -81,7 +81,6 @@ class MemCmd
         ReadExReq,
         ReadExResp,
         LoadLockedReq,
-        LoadLockedResp,
         StoreCondReq,
         StoreCondResp,
         SwapReq,
@@ -295,7 +294,7 @@ class Packet : public FastAlloc, public Printable
      *    needed to process it.  A specific subclass would be derived
      *    from this to carry state specific to a particular sending
      *    device.  */
-    class SenderState : public FastAlloc {
+    class SenderState {
       public:
         virtual ~SenderState() {}
     };
@@ -304,7 +303,7 @@ class Packet : public FastAlloc, public Printable
      * Object used to maintain state of a PrintReq.  The senderState
      * field of a PrintReq should always be of this type.
      */
-    class PrintReqState : public SenderState {
+    class PrintReqState : public SenderState, public FastAlloc {
         /** An entry in the label stack. */
         class LabelStackEntry {
           public:
@@ -455,7 +454,15 @@ class Packet : public FastAlloc, public Printable
 
     /** Destructor. */
     ~Packet()
-    { if (staticData || dynamicData) deleteData(); }
+    {
+        // If this is a request packet for which there's no response,
+        // delete the request object here, since the requester will
+        // never get the chance.
+        if (req && isRequest() && !needsResponse())
+            delete req;
+        if (staticData || dynamicData)
+            deleteData();
+    }
 
     /** Reinitialize packet address and size from the associated
      *   Request object, and reset other fields that may have been