Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
close gforge bug 18137 (allow different stack sizes): that was possible since years...
[simgrid.git] / src / kernel / context / ContextRaw.cpp
index 47fe3f0..4cc658a 100644 (file)
@@ -197,12 +197,13 @@ RawContext* RawContextFactory::create_context(std::function<void()>&& code, acto
 RawContext::RawContext(std::function<void()>&& code, actor::ActorImpl* actor, SwappedContextFactory* factory)
     : SwappedContext(std::move(code), actor, factory)
 {
-   if (has_code()) {
-     this->stack_top_ = raw_makecontext(get_stack(), smx_context_stack_size, smx_ctx_wrapper, this);
-   } else {
-     if (MC_is_active())
-       MC_ignore_heap(&stack_top_, sizeof(stack_top_));
-   }
+  XBT_VERB("Creating a context of stack %uMb", smx_context_stack_size / 1024 / 1024);
+  if (has_code()) {
+    this->stack_top_ = raw_makecontext(get_stack(), smx_context_stack_size, smx_ctx_wrapper, this);
+  } else {
+    if (MC_is_active())
+      MC_ignore_heap(&stack_top_, sizeof(stack_top_));
+  }
 }
 
 void RawContext::swap_into_for_real(SwappedContext* to_)