pthread_cond_destroy(&(context->cond));
#endif
if(context->exception) free(context->exception);
+
+ #ifdef USE_WIN_CONTEXT
+ if(context->uc.uc_stack.ss_sp)
+ free (context->uc.uc_stack.ss_sp);
+ #endif
+
free(context);
return;
}
# ifndef USE_WIN_CONTEXT
res->uc.uc_stack.ss_sp = pth_skaddr_makecontext(res->stack,STACK_SIZE);
res->uc.uc_stack.ss_size = pth_sksize_makecontext(res->stack,STACK_SIZE);
+#else
+ res->uc.uc_stack.ss_sp = xbt_malloc(STACK_SIZE);
+ res->uc.uc_stack.ss_size = STACK_SIZE ;
# endif /* USE_WIN_CONTEXT */
#endif /* USE_PTHREADS or not */
res->argc = argc;