X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6ea7c6220ef3aea972da1ce8fff827e0209f7052..7ca4c132b1f3a64287b8c1cc0c8f9822fa761616:/src/simix/smx_context_base.c?ds=sidebyside diff --git a/src/simix/smx_context_base.c b/src/simix/smx_context_base.c index 56efcf1403..e248369e7a 100644 --- 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 "mc/mc.h" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(bindings); @@ -46,6 +47,10 @@ smx_ctx_base_factory_create_context_sized(size_t 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) + 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 */ @@ -59,13 +64,15 @@ smx_ctx_base_factory_create_context_sized(size_t size, } context->data = data; + if(MC_IS_ENABLED && code) + MC_new_stack_area(context, ((smx_process_t)context->data)->name); + return context; } void smx_ctx_base_free(smx_context_t context) { int i; - if (context) { /* free argv */