From 486d18df5ca93e043fdd14fac1d22b5fe40fb6f6 Mon Sep 17 00:00:00 2001 From: bd Date: Mon, 10 Mar 2025 14:53:59 -0400 Subject: Update cli method signatures, add some getters to cache and storage --- src/storage/cache.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/storage/cache.cc') 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, L1_CACHE_SIZE> *Cache::get_meta() +{ + return &(this->meta); +} -- cgit v1.2.3