summaryrefslogtreecommitdiff
path: root/src/mem
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2008-05-15 19:10:26 -0400
committerAli Saidi <saidi@eecs.umich.edu>2008-05-15 19:10:26 -0400
commite71a5270a2fe040e0542bc2c74a11a303688f6ae (patch)
treea4714028a2aabebeda1147d0c6a5a17cd75203fb /src/mem
parent4a4317ae18504226d298d42929b9882837ab1b44 (diff)
downloadgem5-e71a5270a2fe040e0542bc2c74a11a303688f6ae.tar.xz
Make sure that output files are always checked success before they're used.
Make OutputDirectory::resolve() private and change the functions using resolve() to instead use create(). --HG-- extra : convert_revision : 36d4be629764d0c4c708cec8aa712cd15f966453
Diffstat (limited to 'src/mem')
-rw-r--r--src/mem/cache/tags/split.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mem/cache/tags/split.cc b/src/mem/cache/tags/split.cc
index 0df85cc92..5bed44bd3 100644
--- a/src/mem/cache/tags/split.cc
+++ b/src/mem/cache/tags/split.cc
@@ -379,13 +379,12 @@ Split::cleanupRefs()
else if (lru_net)
lru_net->cleanupRefs();
- ofstream memPrint(simout.resolve("memory_footprint.txt").c_str(),
- ios::trunc);
+ ostream *memPrint = simout.create("memory_footprint.txt");
// this shouldn't be here but it happens at the end, which is what i want
memIter end = memHash.end();
for (memIter iter = memHash.begin(); iter != end; ++iter) {
- ccprintf(memPrint, "%8x\t%d\n", (*iter).first, (*iter).second);
+ ccprintf(*memPrint, "%8x\t%d\n", (*iter).first, (*iter).second);
}
}