summaryrefslogtreecommitdiff
path: root/base/misc.cc
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2003-10-10 09:53:16 -0400
committerNathan Binkert <binkertn@umich.edu>2003-10-10 09:53:16 -0400
commitf4e2b3fa77e3bd24f3e5921e5c9616c8a82ce36c (patch)
tree8f23b36f444e730b0d3f5891a872a11000aa462b /base/misc.cc
parenta2b619df6d4ce403077639e4329ec6ad6cd53735 (diff)
downloadgem5-f4e2b3fa77e3bd24f3e5921e5c9616c8a82ce36c.tar.xz
Stop using omisc.h and move relevant functions to better places
while converting them to C++ base/intmath.hh: Add some functions that were previously defined elsewhere in C base/misc.cc: Use the C++ version of memUsage, and sort #includes sim/prog.cc: Stop using the old macro versions of various functions and use the new ones defined in intmath.hh sim/sim_events.cc: Stop using the old C versions of various functions and use the new ones defined in hostinfo.hh --HG-- extra : convert_revision : 15d1f24d2aff4254c745eea6070cb230dd37b8d2
Diffstat (limited to 'base/misc.cc')
-rw-r--r--base/misc.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/base/misc.cc b/base/misc.cc
index 0ce9f7be9..4a8facca8 100644
--- a/base/misc.cc
+++ b/base/misc.cc
@@ -29,11 +29,12 @@
#include <iostream>
#include <string>
-#include "host.hh"
#include "cprintf.hh"
+#include "host.hh"
+#include "hostinfo.hh"
#include "misc.hh"
-#include "universe.hh"
#include "trace.hh"
+#include "universe.hh"
using namespace std;
@@ -61,8 +62,6 @@ void
__fatal(const string &format, cp::ArgList &args, const char *func,
const char *file, int line)
{
- long mem_usage();
-
string fmt = "fatal: " + format + " [%s:%s, line %d]\n"
"\n%d\nMemory Usage: %ld KBytes\n";
@@ -70,7 +69,7 @@ __fatal(const string &format, cp::ArgList &args, const char *func,
args.append(file);
args.append(line);
args.append(curTick);
- args.append(mem_usage());
+ args.append(memUsage());
args.dump(cerr, fmt);
delete &args;