Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Move SIMIX comm requests to the top of the big switch
[simgrid.git] / src / simix / smx_context_raw.c
index 501149b..afb3cc8 100644 (file)
@@ -217,6 +217,7 @@ static void smx_ctx_raw_free(smx_context_t context)
         context)->valgrind_stack_id);
 #endif                          /* HAVE_VALGRIND_VALGRIND_H */
 
+    free(((smx_ctx_raw_t)context)->malloced_stack);
   }
   smx_ctx_base_free(context);
 }
@@ -297,7 +298,7 @@ void SIMIX_ctx_raw_factory_init(smx_context_factory_t *factory)
   (*factory)->suspend = smx_ctx_raw_suspend;
   (*factory)->name = "smx_raw_context_factory";
 
-  if(_surf_parallel_contexts){
+  if (smx_parallel_contexts) {
 #ifdef CONTEXT_THREADS  /* To use parallel ucontexts a thread pool is needed */
     parmap = xbt_parmap_new(2);
     (*factory)->runall = smx_ctx_raw_runall_parallel;