From 15770fb7b43fad1bcfb1fabcb80cc47f8e2d7f08 Mon Sep 17 00:00:00 2001 From: Lisa Hsu Date: Wed, 18 Oct 2006 18:01:33 -0400 Subject: [PATCH] need some initializations before doing the loop. --HG-- extra : convert_revision : e5e8b16ae4f119c923d8c0d295aa9569d7a8fe5b --- src/mem/page_table.cc | 5 +++-- 1 file 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::iterator iter; - while (iter != pTable.end()) { + m5::hash_map::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()); } -- 2.30.2