This should not really allocate the 8 MiB in RAM, thus occupating the same amount of real memory than before
This behavior is at least true on Linux and BSD systems
If you want to push the scalability limits of your code, you really
want to reduce the \b contexts/stack_size item. Its default value
-is 128 (in KiB), while our Chord simulation works with stacks as small
+is 8 (in MiB), while our Chord simulation works with stacks as small
as 16 KiB, for example. For the thread factory, the default value
is the one of the system, if it is too large/small, it has to be set
with this parameter.
xbt_cfg_register(&_sg_cfg_set, "contexts/stack_size",
"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);
+ xbt_cfg_setdefault_int(_sg_cfg_set, "contexts/stack_size", 8*1024);
/* No, it was not set yet (the above setdefault() changed this to 1). */
smx_context_stack_size_was_set = 0;
char* smx_context_factory_name = NULL; /* factory name specified by --cfg=contexts/factory:value */
smx_ctx_factory_initializer_t smx_factory_initializer_to_use = NULL;
-int smx_context_stack_size = 128 * 1024;
+int smx_context_stack_size = 8 * 1024 * 1024;
int smx_context_stack_size_was_set = 0;
#ifdef HAVE_THREAD_LOCAL_STORAGE
static __thread smx_context_t smx_current_context_parallel;