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 : ignore stack areas in heap comparison algorithm for the comparison...
[simgrid.git]
/
src
/
simix
/
smx_context_base.c
diff --git
a/src/simix/smx_context_base.c
b/src/simix/smx_context_base.c
index 944dd7a1b518651f0062b5068ea812991093d5dd..c934a08e4bfe23e82decebd74dea80b106c431cd 100644
(file)
--- a/
src/simix/smx_context_base.c
+++ b/
src/simix/smx_context_base.c
@@
-10,6
+10,7
@@
#include "xbt/function_types.h"
#include "simgrid/simix.h"
#include "smx_private.h"
#include "xbt/function_types.h"
#include "simgrid/simix.h"
#include "smx_private.h"
+#include "mc/mc.h"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(bindings);
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(bindings);
@@
-46,6
+47,16
@@
smx_ctx_base_factory_create_context_sized(size_t size,
{
smx_context_t context = xbt_malloc0(size);
{
smx_context_t context = xbt_malloc0(size);
+ /* Store the address of the stack in heap to compare it apart of heap comparison */
+ if(MC_IS_ENABLED){
+
+ if(mmalloc_ignore == NULL)
+ MC_ignore_init();
+
+ MC_ignore(context, size);
+
+ }
+
/* If the user provided a function for the process then use it.
Otherwise, it is the context for maestro and we should set it as the
current context */
/* If the user provided a function for the process then use it.
Otherwise, it is the context for maestro and we should set it as the
current context */
@@
-59,13
+70,15
@@
smx_ctx_base_factory_create_context_sized(size_t size,
}
context->data = data;
}
context->data = data;
+ if(MC_IS_ENABLED)
+ MC_new_stack_area(context, ((smx_process_t)context->data)->name);
+
return context;
}
void smx_ctx_base_free(smx_context_t context)
{
int i;
return context;
}
void smx_ctx_base_free(smx_context_t context)
{
int i;
-
if (context) {
/* free argv */
if (context) {
/* free argv */
@@
-83,7
+96,6
@@
void smx_ctx_base_free(smx_context_t context)
void smx_ctx_base_stop(smx_context_t context)
{
void smx_ctx_base_stop(smx_context_t context)
{
- SIMIX_process_on_exit_runall(context->data);
if (context->cleanup_func)
context->cleanup_func(context->data);
context->iwannadie = 0;
if (context->cleanup_func)
context->cleanup_func(context->data);
context->iwannadie = 0;