summaryrefslogtreecommitdiff
path: root/src/mem
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2006-10-19 23:35:59 -0700
committerNathan Binkert <binkertn@umich.edu>2006-10-19 23:35:59 -0700
commit5b246a0567193b05d8257fce8c43610ce5b8c253 (patch)
tree2a82f7ef3f00e6c15e5be0ceeb4a9c4a00ca673a /src/mem
parentb937d5451061cf76842163305fbc411f02b80ed5 (diff)
downloadgem5-5b246a0567193b05d8257fce8c43610ce5b8c253.tar.xz
initialize end, clean up loop
--HG-- extra : convert_revision : e1c107f0c0fd5d535acd2d6c43571a5df57c9ed3
Diffstat (limited to 'src/mem')
-rw-r--r--src/mem/page_table.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/mem/page_table.cc b/src/mem/page_table.cc
index fa6d5ddfb..fe8094b88 100644
--- a/src/mem/page_table.cc
+++ b/src/mem/page_table.cc
@@ -170,11 +170,14 @@ PageTable::serialize(std::ostream &os)
int count = 0;
- m5::hash_map<Addr,Addr>::iterator iter;
- 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);
+ m5::hash_map<Addr,Addr>::iterator iter = pTable.begin();
+ m5::hash_map<Addr,Addr>::iterator end = pTable.end();
+ while (iter != end) {
+ paramOut(os, csprintf("ptable.entry%dvaddr", count), iter->first);
+ paramOut(os, csprintf("ptable.entry%dpaddr", count), iter->second);
+
+ ++iter;
+ ++count;
}
assert(count == pTable.size());
}