34c34
< * The victim is chosen using the timestamp. The block that was accessed the
---
> * The victim is chosen using the timestamp. The entry that was accessed the
45a46,58
> protected:
> /** MRU-specific implementation of replacement data. */
> struct MRUReplData : ReplacementData
> {
> /** Tick on which the entry was last touched. */
> Tick lastTouchTick;
>
> /**
> * Default constructor. Invalidate data.
> */
> MRUReplData() : lastTouchTick(0) {}
> };
>
61c74,75
< * Touch a block to update its last touch tick.
---
> * Invalidate replacement data to set it as the next probable victim.
> * Sets its last touch tick as the starting tick.
63c77
< * @param blk Cache block to be touched.
---
> * @param replacement_data Replacement data to be invalidated.
65c79,80
< void touch(CacheBlk *blk) override;
---
> void invalidate(const std::shared_ptr<ReplacementData>& replacement_data)
> const override;
68c83
< * Reset replacement data for a block. Used when a block is inserted.
---
> * Touch an entry to update its replacement data.
71c86
< * @param blk Cache block to be reset.
---
> * @param replacement_data Replacement data to be touched.
73c88,89
< void reset(CacheBlk *blk) override;
---
> void touch(const std::shared_ptr<ReplacementData>& replacement_data) const
> override;
75a92,100
> * Reset replacement data. Used when an entry is inserted.
> * Sets its last touch tick as the current tick.
> *
> * @param replacement_data Replacement data to be reset.
> */
> void reset(const std::shared_ptr<ReplacementData>& replacement_data) const
> override;
>
> /**
76a102
> *
78c104
< * @return Cache block to be replaced.
---
> * @return Replacement entry to be replaced.
80c106,114
< CacheBlk* getVictim(const ReplacementCandidates& candidates) override;
---
> ReplaceableEntry* getVictim(const ReplacementCandidates& candidates) const
> override;
>
> /**
> * Instantiate a replacement data entry.
> *
> * @return A shared pointer to the new replacement data.
> */
> std::shared_ptr<ReplacementData> instantiateEntry() override;