diff options
Diffstat (limited to 'src/storage/cache.cc')
-rw-r--r-- | src/storage/cache.cc | 11 |
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); +} |