X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/19d1ade0136fac9de3fbc23c15d9fac43496fd29..8985a1134de89a845dd5fb959c9a1fe776b890bf:/src/simix/smx_process.c diff --git a/src/simix/smx_process.c b/src/simix/smx_process.c index 68e8940728..bc5c0871a0 100644 --- a/src/simix/smx_process.c +++ b/src/simix/smx_process.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2012. The SimGrid Team. +/* Copyright (c) 2007-2013. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -95,7 +95,6 @@ void SIMIX_process_cleanup(smx_process_t process) } } - /*xbt_swag_remove(process, simix_global->process_to_run);*/ xbt_swag_remove(process, simix_global->process_list); xbt_swag_remove(process, SIMIX_host_priv(process->smx_host)->process_list); xbt_swag_insert(process, simix_global->process_to_destroy); @@ -123,8 +122,8 @@ void SIMIX_process_empty_trash(void) xbt_dynar_free(&process->on_exit); - free(process->name); - free(process); + xbt_free(process->name); + xbt_free(process); } } @@ -240,8 +239,12 @@ void SIMIX_process_create(smx_process_t *process, XBT_DEBUG("Start process %s on host '%s'", name, hostname); if (!SIMIX_host_get_state(host)) { + int i; XBT_WARN("Cannot launch process '%s' on failed host '%s'", name, hostname); + for (i = 0; i < argc; i++) + xbt_free(argv[i]); + xbt_free(argv); } else { *process = xbt_new0(s_smx_process_t, 1); @@ -276,6 +279,10 @@ void SIMIX_process_create(smx_process_t *process, (*process)->running_ctx = xbt_new(xbt_running_ctx_t, 1); XBT_RUNNING_CTX_INITIALIZE((*process)->running_ctx); + if(MC_is_active()){ + MC_ignore_heap((*process)->running_ctx, sizeof(*(*process)->running_ctx)); + } + /* Add properties */ (*process)->properties = properties;