summaryrefslogtreecommitdiff
path: root/src/storage/cache.cc
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-03-10 14:53:59 -0400
committerbd <bdunahu@operationnull.com>2025-03-10 14:53:59 -0400
commitcdcaec3c1e62b47fcd270df651cd0e343e46f0e7 (patch)
treefc77cc22024b719f14e03e29e2bbd94b3eb645ca /src/storage/cache.cc
parent1f8b8babcfb383f1fb0281663561161061684206 (diff)
Update cli method signatures, add some getters to cache and storage
Diffstat (limited to 'src/storage/cache.cc')
-rw-r--r--src/storage/cache.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/storage/cache.cc b/src/storage/cache.cc
index 2031367..55c8cfa 100644
--- a/src/storage/cache.cc
+++ b/src/storage/cache.cc
@@ -16,7 +16,11 @@ Cache::Cache(Storage *lower, int delay)
this->wait_time = this->delay;
}
-Cache::~Cache() { delete this->data; }
+Cache::~Cache()
+{
+ delete this->lower;
+ delete this->data;
+}
Response Cache::write(Accessor accessor, signed int data, int address)
{
@@ -76,3 +80,8 @@ void Cache::fetch_resource(int expected)
this->is_waiting = (r == OK) ? false : true;
}
+
+std::array<std::array<int, 2>, L1_CACHE_SIZE> *Cache::get_meta()
+{
+ return &(this->meta);
+}