mem-cache: Fix non-bijective function in Skewed caches
[gem5.git] / src / mem / cache / mshr_queue.hh
index ff78cbebba9c844f0b7359bfe6060577d9aa9dff..1b960a5a2036d03da96258a9fb3ee214df072a44 100644 (file)
 #ifndef __MEM_CACHE_MSHR_QUEUE_HH__
 #define __MEM_CACHE_MSHR_QUEUE_HH__
 
-#include <vector>
+#include <string>
 
+#include "base/types.hh"
 #include "mem/cache/mshr.hh"
 #include "mem/cache/queue.hh"
+#include "mem/packet.hh"
 
 /**
  * A Class for maintaining a list of pending and allocated memory requests.
@@ -141,7 +143,9 @@ class MSHRQueue : public Queue<MSHR>
      */
     bool canPrefetch() const
     {
-        return (allocated < numEntries - (numReserve + demandReserve));
+        // @todo we may want to revisit the +1, currently added to
+        // keep regressions unchanged
+        return (allocated < numEntries - (numReserve + 1 + demandReserve));
     }
 };