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
cleanup MSG after simulation
[simgrid.git]
/
examples
/
gras_stub_generator
diff --git
a/examples/gras_stub_generator
b/examples/gras_stub_generator
index
9fd9bd6
..
84a1c8b
100755
(executable)
--- a/
examples/gras_stub_generator
+++ b/
examples/gras_stub_generator
@@
-64,6
+64,7
@@
int launch_$_(int argc, char **argv) {
char **myargv=argv;
int myargc=argc;
int i;
char **myargv=argv;
int myargc=argc;
int i;
+ int retcode;
if (gras_log) {
myargv=malloc((argc+1) * sizeof(char**));
if (gras_log) {
myargv=malloc((argc+1) * sizeof(char**));
@@
-71,10
+72,10
@@
int launch_$_(int argc, char **argv) {
myargv[i] = argv[i];
myargv[myargc++] = gras_log;
}
myargv[i] = argv[i];
myargv[myargc++] = gras_log;
}
- $_(myargc,myargv);
+
retcode =
$_(myargc,myargv);
if (myargv != argv)
free(myargv);
if (myargv != argv)
free(myargv);
- return
0
;
+ return
retcode
;
}
EOF
}
EOF
@@
-130,6
+131,8
@@
print OUT <<EOF
/* Run the simulation */
MSG_main();
/* Run the simulation */
MSG_main();
+ /* cleanup the place */
+ MSG_clean();
if (gras_log)
free(gras_log);
return 0;
if (gras_log)
free(gras_log);
return 0;