A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Chasing more leaks.
[simgrid.git]
/
src
/
simix
/
smx_process.c
diff --git
a/src/simix/smx_process.c
b/src/simix/smx_process.c
index
33d0ad1
..
bc5c087
100644
(file)
--- a/
src/simix/smx_process.c
+++ b/
src/simix/smx_process.c
@@
-1,4
+1,4
@@
-/* Copyright (c) 2007-201
2
. The SimGrid Team.
+/* Copyright (c) 2007-201
3
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-122,8
+122,8
@@
void SIMIX_process_empty_trash(void)
xbt_dynar_free(&process->on_exit);
xbt_dynar_free(&process->on_exit);
- free(process->name);
- free(process);
+
xbt_
free(process->name);
+
xbt_
free(process);
}
}
}
}
@@
-239,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)) {
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);
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);
}
else {
*process = xbt_new0(s_smx_process_t, 1);
@@
-275,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);
(*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;
/* Add properties */
(*process)->properties = properties;