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/common/SubBlock.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/common/SubBlock.cc')
-rw-r--r-- | src/mem/ruby/common/SubBlock.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mem/ruby/common/SubBlock.cc b/src/mem/ruby/common/SubBlock.cc index 5a42a415d..48485bf8b 100644 --- a/src/mem/ruby/common/SubBlock.cc +++ b/src/mem/ruby/common/SubBlock.cc @@ -26,12 +26,15 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "base/stl_helpers.hh" #include "mem/ruby/common/SubBlock.hh" +using m5::stl_helpers::operator<<; + SubBlock::SubBlock(const Address& addr, int size) { m_address = addr; - setSize(size); + resize(size); for (int i = 0; i < size; i++) { setByte(i, 0); } |