From: Steve Reinhardt Date: Sat, 8 Jan 2011 05:50:29 +0000 (-0800) Subject: sim: delete unused CheckSwapEvent code. X-Git-Tag: stable_2012_02_02~676 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=030736a69b238f1da7f9ed6409ce5ab9e094c9fb;p=gem5.git sim: delete unused CheckSwapEvent code. There's no way to even create one of these anymore. --- diff --git a/src/sim/sim_events.cc b/src/sim/sim_events.cc index 8c706382d..d53fca3c3 100644 --- a/src/sim/sim_events.cc +++ b/src/sim/sim_events.cc @@ -123,36 +123,3 @@ CountedExitEvent::description() const { return "counted exit"; } - -CheckSwapEvent::CheckSwapEvent(int ival) - : interval(ival) -{ - mainEventQueue.schedule(this, curTick + interval); -} - -void -CheckSwapEvent::process() -{ - /* Check the amount of free swap space */ - long swap; - - /* returns free swap in KBytes */ - swap = procInfo("/proc/meminfo", "SwapFree:"); - - if (swap < 1000) - ccprintf(cerr, "\a\a\aWarning! Swap space is low (%d)\n", swap); - - if (swap < 100) { - cerr << "\a\aAborting Simulation! Inadequate swap space!\n\n"; - exitSimLoop("Lack of swap space"); - } - - assert(getFlags(IsMainQueue)); - mainEventQueue.schedule(this, curTick + interval); -} - -const char * -CheckSwapEvent::description() const -{ - return "check swap"; -} diff --git a/src/sim/sim_events.hh b/src/sim/sim_events.hh index ffd31f385..17e2cc202 100644 --- a/src/sim/sim_events.hh +++ b/src/sim/sim_events.hh @@ -90,19 +90,5 @@ class CountedExitEvent : public Event virtual const char *description() const; }; -// -// Event to check swap usage -// -class CheckSwapEvent : public Event -{ - private: - int interval; - - public: - CheckSwapEvent(int ival); - void process(); // process event - - virtual const char *description() const; -}; #endif // __SIM_SIM_EVENTS_HH__