X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a65b8336dd2a009d8880f167839ee901ebcb2bfb..656d24a575ca26a64c94174ff3573272979e081d:/src/simix/smx_host.cpp diff --git a/src/simix/smx_host.cpp b/src/simix/smx_host.cpp index bfc4f205db..15ffa679fc 100644 --- a/src/simix/smx_host.cpp +++ b/src/simix/smx_host.cpp @@ -23,9 +23,9 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_host, simix, "SIMIX hosts"); void SIMIX_host_create(sg_host_t host) // FIXME: braindead prototype. Take sg_host as parameter { smx_host_priv_t smx_host = xbt_new0(s_smx_host_priv_t, 1); - s_smx_process_t proc; /* Host structure */ + simgrid::simix::Process proc; smx_host->process_list = xbt_swag_new(xbt_swag_offset(proc, host_proc_hookup)); /* Update global variables */ @@ -166,7 +166,7 @@ void _SIMIX_host_free_process_arg(void *data) xbt_free(arg->argv[i]); xbt_free(arg->argv); xbt_free(arg->name); - xbt_free(arg); + delete arg; } /** * \brief Add a process to the list of the processes that the host will restart when it comes back @@ -188,7 +188,7 @@ void SIMIX_host_add_auto_restart_process(sg_host_t host, if (!sg_host_simix(host)->auto_restart_processes) { sg_host_simix(host)->auto_restart_processes = xbt_dynar_new(sizeof(smx_process_arg_t),_SIMIX_host_free_process_arg); } - smx_process_arg_t arg = xbt_new(s_smx_process_arg_t,1); + smx_process_arg_t arg = new s_smx_process_arg_t(); arg->name = xbt_strdup(name); arg->code = code; arg->data = data;