X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d9e3a85686463be06864f1ed310765a91dee2803..df2fe4fa15d80bf6b15e648aa962d15a2a40a2c7:/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 944dd7a1b5..c934a08e4b 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,16 @@ 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){ + + 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 */ @@ -59,13 +70,15 @@ smx_ctx_base_factory_create_context_sized(size_t size, } 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; - 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) { - SIMIX_process_on_exit_runall(context->data); if (context->cleanup_func) context->cleanup_func(context->data); context->iwannadie = 0;