mem-cache: Fix FALRU inCachesMask initialization
authorDaniel R. Carvalho <odanrc@yahoo.com.br>
Wed, 3 Oct 2018 12:37:15 +0000 (14:37 +0200)
committerDaniel Carvalho <odanrc@yahoo.com.br>
Fri, 5 Oct 2018 18:42:49 +0000 (18:42 +0000)
inCachesMask is not being initialized, which triggers an assertion
on insertion. Fix this by implementing a default constructor for
the FALRUBlk.

Change-Id: I587cf5e0191c4587d938e6ab6036ec1b32f37793
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/13207
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

src/mem/cache/tags/fa_lru.hh

index 876219b00aef86f31258a8f9f5b6958d6f1801da..55362a4241eb1081d3f016ba496a6365dddd5699 100644 (file)
@@ -82,6 +82,8 @@ typedef uint32_t CachesMask;
 class FALRUBlk : public CacheBlk
 {
   public:
+    FALRUBlk() : CacheBlk(), prev(nullptr), next(nullptr), inCachesMask(0) {}
+
     /** The previous block in LRU order. */
     FALRUBlk *prev;
     /** The next block in LRU order. */