summaryrefslogtreecommitdiff
path: root/utils.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-07-26 05:06:06 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-07-26 05:06:06 -0400
commit162d982b0cf1a5ac2e67012a3b8eadae3c1ac59f (patch)
tree1d29680db03ab4f8a82f77630a6e1a9fc10571bb /utils.cc
parent961b30926b3b9f2b3e9c1a99df3f25fea6b13118 (diff)
downloadfork-ledger-162d982b0cf1a5ac2e67012a3b8eadae3c1ac59f.tar.gz
fork-ledger-162d982b0cf1a5ac2e67012a3b8eadae3c1ac59f.tar.bz2
fork-ledger-162d982b0cf1a5ac2e67012a3b8eadae3c1ac59f.zip
The --verify option is now working properly again. Use "--verify --verbose"
if you wish to see memory usage statistics along with a top-level trace.
Diffstat (limited to 'utils.cc')
-rw-r--r--utils.cc21
1 files changed, 10 insertions, 11 deletions
diff --git a/utils.cc b/utils.cc
index 96da4b24..f2ba83e6 100644
--- a/utils.cc
+++ b/utils.cc
@@ -109,21 +109,20 @@ void shutdown_memory_tracing()
if (live_objects) {
IF_DEBUG("memory.counts")
report_memory(std::cerr, true);
- else
- IF_DEBUG("memory.counts.live")
- report_memory(std::cerr);
+ else IF_DEBUG("memory.counts.live")
+ report_memory(std::cerr);
else if (live_objects->size() > 0)
report_memory(std::cerr);
}
- checked_delete(live_memory); live_memory = NULL;
- checked_delete(live_memory_count); live_memory_count = NULL;
+ checked_delete(live_memory); live_memory = NULL;
+ checked_delete(live_memory_count); live_memory_count = NULL;
checked_delete(total_memory_count); total_memory_count = NULL;
- checked_delete(live_objects); live_objects = NULL;
- checked_delete(live_object_count); live_object_count = NULL;
+ checked_delete(live_objects); live_objects = NULL;
+ checked_delete(live_object_count); live_object_count = NULL;
checked_delete(total_object_count); total_object_count = NULL;
- checked_delete(total_ctor_count); total_ctor_count = NULL;
+ checked_delete(total_ctor_count); total_ctor_count = NULL;
}
inline void add_to_count_map(object_count_map& the_map,
@@ -254,7 +253,7 @@ inline void report_count_map(std::ostream& out, object_count_map& the_map)
i != the_map.end();
i++)
out << " " << std::right << std::setw(12) << (*i).second.first
- << " " << std::right << std::setw(12) << (*i).second.second
+ << " " << std::right << std::setw(7) << (*i).second.second
<< " " << std::left << (*i).first
<< std::endl;
}
@@ -347,7 +346,7 @@ void report_memory(std::ostream& out, bool report_all)
for (live_memory_map::const_iterator i = live_memory->begin();
i != live_memory->end();
i++)
- out << " " << std::right << std::setw(7) << (*i).first
+ out << " " << std::right << std::setw(12) << (*i).first
<< " " << std::right << std::setw(7) << (*i).second.second
<< " " << std::left << (*i).second.first
<< std::endl;
@@ -369,7 +368,7 @@ void report_memory(std::ostream& out, bool report_all)
for (live_objects_map::const_iterator i = live_objects->begin();
i != live_objects->end();
i++)
- out << " " << std::right << std::setw(7) << (*i).first
+ out << " " << std::right << std::setw(12) << (*i).first
<< " " << std::right << std::setw(7) << (*i).second.second
<< " " << std::left << (*i).second.first
<< std::endl;