Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Correctly remember when "contexts/stack_size" was not set by the user.
[simgrid.git] / src / simgrid / sg_config.c
index 5365b64..b57bc22 100644 (file)
@@ -405,7 +405,8 @@ static void _sg_cfg_cb__gtnets_jitter_seed(const char *name, int pos)
 /* create the config set, register what should be and parse the command line*/
 void sg_config_init(int *argc, char **argv)
 {
-  char *description = xbt_malloc(1024), *p = description;
+  char *description = xbt_malloc(1024);
+  char *p;
   int i;
 
   /* Create the configuration support */
@@ -627,6 +628,8 @@ void sg_config_init(int *argc, char **argv)
                      "Stack size of contexts in Kib",
                      xbt_cfgelm_int, 1, 1, _sg_cfg_cb_context_stack_size, NULL);
     xbt_cfg_setdefault_int(_sg_cfg_set, "contexts/stack_size", 128);
+    /* No, it was not set yet (the above setdefault() changed this to 1). */
+    smx_context_stack_size_was_set = 0;
 
     /* number of parallel threads for user processes */
     xbt_cfg_register(&_sg_cfg_set, "contexts/nthreads",