-/* Copyright (c) 2009-2011. The SimGrid Team.
+/* Copyright (c) 2009-2011, 2013. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
CpuCas01Model::CpuCas01Model() : CpuModel("cpu")
{
- ActionPtr action;
- ActionLmmPtr actionlmm;
+ ActionPtr action = NULL;
+ ActionLmmPtr actionlmm = NULL;
char *optim = xbt_cfg_get_string(_sg_cfg_set, "cpu/optim");
int select = xbt_cfg_get_boolean(_sg_cfg_set, "cpu/maxmin_selective_update");
CpuTiModel::CpuTiModel() : CpuModel("cpu_ti")
{
xbt_assert(!surf_cpu_model_pm,"CPU model already initialized. This should not happen.");
- ActionPtr action;
+ ActionPtr action = NULL;
CpuTi cpu;
cpu_ti_running_action_set_that_does_not_need_being_checked =
XBT_DEBUG("power scale %lf", powerScale);
p_availTrace = new CpuTiTgmr(powerTrace, powerScale);
- CpuTiActionPtr action;
+ CpuTiActionPtr action = NULL;
p_actionSet = xbt_swag_new(xbt_swag_offset(*action, p_cpuListHookup));
xbt_dynar_get_cpy(powerPeak, 0, &m_powerPeak);
void NetworkCm02Model::initialize()
{
- ActionLmm comm;
+ ActionLmmPtr comm = NULL;
char *optim = xbt_cfg_get_string(_sg_cfg_set, "network/optim");
int select =
if (p_updateMechanism == UM_LAZY) {
p_actionHeap = xbt_heap_new(8, NULL);
xbt_heap_set_update_callback(p_actionHeap, surf_action_lmm_update_index_heap);
- p_modifiedSet = xbt_swag_new(xbt_swag_offset(comm, p_actionListHookup));
+ p_modifiedSet = xbt_swag_new(xbt_swag_offset(*comm, p_actionListHookup));
p_maxminSystem->keep_track = p_modifiedSet;
}
}
m_actSuspendCB(0), m_actCancelCB(0), m_actResumeCB(0),
p_maxminSystem(0)
{
- ActionPtr action;
+ ActionPtr action = NULL;
p_readyActionSet = xbt_swag_new(xbt_swag_offset(*action, p_stateHookup));
p_runningActionSet = xbt_swag_new(xbt_swag_offset(*action, p_stateHookup));
p_failedActionSet = xbt_swag_new(xbt_swag_offset(*action, p_stateHookup));