double time = 0;
int i = 0;
nbPoints_ = speedTrace->event_list.size() + 1;
- timePoints_ = static_cast<double*>(xbt_malloc0(sizeof(double) * nbPoints_));
- integral_ = static_cast<double*>(xbt_malloc0(sizeof(double) * nbPoints_));
+ timePoints_ = new double[nbPoints_];
+ integral_ = new double[nbPoints_];
for (auto val : speedTrace->event_list) {
timePoints_[i] = time;
integral_[i] = integral;
CpuTiTrace::~CpuTiTrace()
{
- xbt_free(timePoints_);
- xbt_free(integral_);
+ delete [] timePoints_;
+ delete [] integral_;
}
CpuTiTgmr::~CpuTiTgmr()
return new CpuTi(this, host, speedPerPstate, core);
}
-double CpuTiModel::next_occuring_event(double now)
+double CpuTiModel::nextOccuringEvent(double now)
{
double min_action_duration = -1;
} else if (event == stateEvent_) {
if (value > 0) {
if(isOff())
- host_that_restart.push_back(getName());
+ host_that_restart.push_back(getHost());
turnOn();
} else {
turnOff();