#include <functional>
#include <string>
#include <unordered_map>
+#include <vector>
#include "base/bitfield.hh"
#include "base/intmath.hh"
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 "
numTrackedCaches);
}
- ~CacheTracking()
- {
- delete[] boundaries;
- }
-
/**
* Initialiaze cache blocks and the tracking mechanism
*
/** 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:
/**