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
model-checker : memory leak
[simgrid.git]
/
src
/
mc
/
mc_pair.c
diff --git
a/src/mc/mc_pair.c
b/src/mc/mc_pair.c
index
9e8ff3e
..
ee3ad5d
100644
(file)
--- a/
src/mc/mc_pair.c
+++ b/
src/mc/mc_pair.c
@@
-1,24
+1,35
@@
-/* Copyright (c) 2013 Da SimGrid Team. All rights reserved. */
+/* Copyright (c) 2013-2014. The SimGrid Team.
+ * All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
+#include <xbt.h>
+#include "mc_liveness.h"
#include "mc_private.h"
#include "mc_private.h"
-mc_pair_t MC_pair_new(mc_state_t gs, xbt_automaton_state_t as, int r){
+mc_pair_t MC_pair_new()
+{
mc_pair_t p = NULL;
p = xbt_new0(s_mc_pair_t, 1);
mc_pair_t p = NULL;
p = xbt_new0(s_mc_pair_t, 1);
- p->
automaton_state = a
s;
- p->
graph_state = gs
;
- p->s
ystem_state = NULL
;
- p->
requests = r
;
+ p->
num = ++mc_stats->expanded_pair
s;
+ p->
exploration_started = 0
;
+ p->s
earch_cycle = 0
;
+ p->
visited_pair_removed = _sg_mc_visited > 0 ? 0 : 1
;
return p;
}
return p;
}
-void MC_pair_delete(mc_pair_t p){
+void MC_pair_delete(mc_pair_t p)
+{
p->automaton_state = NULL;
p->automaton_state = NULL;
- if(p->
system_state
)
- MC_
free_snapshot(p->system_state
);
-
MC_state_delete(p->graph_state
);
+ if(p->
visited_pair_removed
)
+ MC_
state_delete(p->graph_state, 1
);
+
xbt_dynar_free(&(p->atomic_propositions)
);
xbt_free(p);
xbt_free(p);
+ p = NULL;
+}
+
+void mc_pair_free_voidp(void *p)
+{
+ MC_pair_delete((mc_pair_t) * (void **) p);
}
}