summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mem/cache/tags/fa_lru.hh10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/mem/cache/tags/fa_lru.hh b/src/mem/cache/tags/fa_lru.hh
index 55362a424..03af572b8 100644
--- a/src/mem/cache/tags/fa_lru.hh
+++ b/src/mem/cache/tags/fa_lru.hh
@@ -53,6 +53,7 @@
#include <functional>
#include <string>
#include <unordered_map>
+#include <vector>
#include "base/bitfield.hh"
#include "base/intmath.hh"
@@ -272,7 +273,7 @@ class FALRU : public BaseTags
numTrackedCaches(max_size > min_size ?
floorLog2(max_size) - floorLog2(min_size) : 0),
inAllCachesMask(mask(numTrackedCaches)),
- boundaries(new FALRUBlk *[numTrackedCaches])
+ boundaries(numTrackedCaches)
{
fatal_if(numTrackedCaches > sizeof(CachesMask) * 8,
"Not enough bits (%s) in type CachesMask type to keep "
@@ -280,11 +281,6 @@ class FALRU : public BaseTags
numTrackedCaches);
}
- ~CacheTracking()
- {
- delete[] boundaries;
- }
-
/**
* Initialiaze cache blocks and the tracking mechanism
*
@@ -356,7 +352,7 @@ class FALRU : public BaseTags
/** A mask for all cache being tracked. */
const CachesMask inAllCachesMask;
/** Array of pointers to blocks at the cache boundaries. */
- FALRUBlk** boundaries;
+ std::vector<FALRUBlk*> boundaries;
protected:
/**