X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1f9d3ddf07955738684abcb0bc108ecd1901374d..dac54c9af9c8feec9decb175411f5b07f8e4b8e4:/src/surf/cpu.cpp diff --git a/src/surf/cpu.cpp b/src/surf/cpu.cpp index 77f06e325f..0c9a2f3d7a 100644 --- a/src/surf/cpu.cpp +++ b/src/surf/cpu.cpp @@ -137,23 +137,23 @@ CpuLmm::CpuLmm(CpuModelPtr model, const char* name, xbt_dict_t properties, int c xbt_assert(model == surf_cpu_model_pm); p_constraintCore = xbt_new(lmm_constraint_t, core); + p_constraintCoreId = xbt_new(void*, core); int i; for (i = 0; i < core; i++) { /* just for a unique id, never used as a string. */ - void *cnst_id = bprintf("%s:%i", name, i); - p_constraintCore[i] = lmm_constraint_new(p_model->p_maxminSystem, cnst_id, m_powerScale * m_powerPeak); + p_constraintCoreId[i] = bprintf("%s:%i", name, i); + p_constraintCore[i] = lmm_constraint_new(p_model->p_maxminSystem, p_constraintCoreId[i], m_powerScale * m_powerPeak); } } CpuLmm::~CpuLmm(){ if (p_constraintCore){ for (int i = 0; i < m_core; i++) { - void *cnst_id = p_constraintCore[i]->id; - //FIXME:lmm_constraint_free(p_model->p_maxminSystem, p_constraintCore[i]); - xbt_free(cnst_id); + xbt_free(p_constraintCoreId[i]); } xbt_free(p_constraintCore); + xbt_free(p_constraintCoreId); } }