Fix of memory leak in controllerMethod.

This commit is contained in:
Lukas Steiner
2019-12-17 23:25:22 +01:00
parent 10f577c38f
commit 705729dee0

View File

@@ -310,13 +310,21 @@ void Controller::controllerMethod()
for (auto it : bankMachines)
{
sc_time delay = it->start();
if (delay != SC_ZERO_TIME || !readyCmdBlocked) // must be checked to avoid livelock
if (delay != (sc_max_time() - sc_time_stamp()) && (delay != SC_ZERO_TIME || !readyCmdBlocked)) // must be checked to avoid livelock
controllerEvent.notify(delay);
}
for (auto it : refreshManagers)
controllerEvent.notify(it->start());
{
sc_time delay = it->start();
if (delay != (sc_max_time() - sc_time_stamp()))
controllerEvent.notify(delay);
}
for (auto it : powerDownManagers)
controllerEvent.notify(it->start());
{
sc_time delay = it->start();
if (delay != (sc_max_time() - sc_time_stamp()))
controllerEvent.notify(delay);
}
}
tlm_sync_enum Controller::nb_transport_fw(tlm_generic_payload &trans,