From: Nikos Nikoleris Date: Thu, 29 Jun 2017 03:46:51 +0000 (+0100) Subject: mem-cache: Make the block invalidate functions virtual X-Git-Tag: v19.0.0.0~2252 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=208b1fc47e53206061751c9915ae9e129f9e89e5;p=gem5.git mem-cache: Make the block invalidate functions virtual This change makes the cache block invalidation function in the BaseTags and CacheBlk class virtual to enable derived classes. Change-Id: I2e64b01c6ca637f16d10474fc8b08eeec3f23453 Reviewed-by: Andreas Sandberg Reviewed-on: https://gem5-review.googlesource.com/8287 Maintainer: Nikos Nikoleris Reviewed-by: Daniel Carvalho --- diff --git a/src/mem/cache/blk.hh b/src/mem/cache/blk.hh index 66f05c884..7dd0a92ae 100644 --- a/src/mem/cache/blk.hh +++ b/src/mem/cache/blk.hh @@ -170,6 +170,7 @@ class CacheBlk CacheBlk(const CacheBlk&) = delete; CacheBlk& operator=(const CacheBlk&) = delete; + virtual ~CacheBlk() {}; /** * Checks the write permissions of this block. @@ -205,7 +206,7 @@ class CacheBlk /** * Invalidate the block and clear all state. */ - void invalidate() + virtual void invalidate() { tag = MaxAddr; task_id = ContextSwitchTaskId::Unknown;