Permalink
Browse files

Cache restart for capacity misses

  • Loading branch information...
1 parent d101cae commit 0853d71171f22e81289a291ad97bab1ee77a3654 @pksunkara committed Aug 23, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 Cache.cpp
View
@@ -54,10 +54,12 @@ void Cache::restart(void) {
for(int i=0; i<num_sets; i++)
delete this->data[i];
delete this->data;
+ delete this->data_cap;
this->data = new Set*[this->num_sets];
for(int i=0; i<num_sets; i++)
this->data[i] = new Set(this->assoc, this->block_size);
+ this->data_cap = new Set(this->cache_size/this->block_size, this->block_size);
this->hits = 0;
for(int i=0; i<4; i++)

0 comments on commit 0853d71

Please sign in to comment.