summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLisa Hsu <hsul@eecs.umich.edu>2006-10-18 18:01:33 -0400
committerLisa Hsu <hsul@eecs.umich.edu>2006-10-18 18:01:33 -0400
commit15770fb7b43fad1bcfb1fabcb80cc47f8e2d7f08 (patch)
tree81346c69e500446a6426eb2ff6db5c414d46faed /src
parentc2c48645c9b4f93cce8c1f653b6ef3e451829112 (diff)
downloadgem5-15770fb7b43fad1bcfb1fabcb80cc47f8e2d7f08.tar.xz
need some initializations before doing the loop.
--HG-- extra : convert_revision : e5e8b16ae4f119c923d8c0d295aa9569d7a8fe5b
Diffstat (limited to 'src')
-rw-r--r--src/mem/page_table.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mem/page_table.cc b/src/mem/page_table.cc
index 32da4282c..fa6d5ddfb 100644
--- a/src/mem/page_table.cc
+++ b/src/mem/page_table.cc
@@ -167,13 +167,14 @@ void
PageTable::serialize(std::ostream &os)
{
paramOut(os, "ptable.size", pTable.size());
+
int count = 0;
m5::hash_map<Addr,Addr>::iterator iter;
- while (iter != pTable.end()) {
+ m5::hash_map<Addr,Addr>::iterator end;
+ for (iter = pTable.begin(); iter != end; ++iter,++count) {
paramOut(os, csprintf("ptable.entry%dvaddr", count),iter->first);
paramOut(os, csprintf("ptable.entry%dpaddr", count),iter->second);
- ++count;
}
assert(count == pTable.size());
}