diff options
author | Nathan Binkert <nate@binkert.org> | 2010-06-10 23:17:07 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2010-06-10 23:17:07 -0700 |
commit | 006818aeea6176c4500c5f7414e9f2a822c77062 (patch) | |
tree | 74adbd6cc14951943bd6eafc4aba2fb98be7a526 /src/mem/ruby/system/CacheMemory.cc | |
parent | bc87fa30d72df7db6265be50b2c39dc218076f9f (diff) | |
download | gem5-006818aeea6176c4500c5f7414e9f2a822c77062.tar.xz |
ruby: get rid of Vector and use STL
add a couple of helper functions to base for deleteing all pointers in
a container and outputting containers to a stream
Diffstat (limited to 'src/mem/ruby/system/CacheMemory.cc')
-rw-r--r-- | src/mem/ruby/system/CacheMemory.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mem/ruby/system/CacheMemory.cc b/src/mem/ruby/system/CacheMemory.cc index 62aa1e25d..c9de85961 100644 --- a/src/mem/ruby/system/CacheMemory.cc +++ b/src/mem/ruby/system/CacheMemory.cc @@ -73,11 +73,11 @@ CacheMemory::init() else assert(false); - m_cache.setSize(m_cache_num_sets); - m_locked.setSize(m_cache_num_sets); + m_cache.resize(m_cache_num_sets); + m_locked.resize(m_cache_num_sets); for (int i = 0; i < m_cache_num_sets; i++) { - m_cache[i].setSize(m_cache_assoc); - m_locked[i].setSize(m_cache_assoc); + m_cache[i].resize(m_cache_assoc); + m_locked[i].resize(m_cache_assoc); for (int j = 0; j < m_cache_assoc; j++) { m_cache[i][j] = NULL; m_locked[i][j] = -1; @@ -266,7 +266,7 @@ CacheMemory::allocate(const Address& address, AbstractCacheEntry* entry) // Find the first open slot Index cacheSet = addressToCacheSet(address); - Vector<AbstractCacheEntry*> &set = m_cache[cacheSet]; + std::vector<AbstractCacheEntry*> &set = m_cache[cacheSet]; for (int i = 0; i < m_cache_assoc; i++) { if (!set[i] || set[i]->m_Permission == AccessPermission_NotPresent) { set[i] = entry; // Init entry |