ruby: cache memory bugfix

This commit is contained in:
Derek Hower 2009-11-13 09:42:47 -06:00
parent 22d9a53080
commit ceb8fde914

View file

@ -218,7 +218,8 @@ void CacheMemory::init(const vector<string> & argv)
}
}
m_cache_num_sets = cache_size / m_cache_assoc;
int num_lines = (cache_size*1024)/RubySystem::getBlockSizeBytes();
m_cache_num_sets = num_lines / m_cache_assoc;
m_cache_num_set_bits = log_int(m_cache_num_sets);
if(policy == "PSEUDO_LRU")