diff --git a/executer/user/mcexec.c b/executer/user/mcexec.c index 6b4488d7..6e911d88 100644 --- a/executer/user/mcexec.c +++ b/executer/user/mcexec.c @@ -195,7 +195,7 @@ static int mpol_no_bss = 0; static int mpol_shm_premap = 0; static int no_bind_ikc_map = 0; static unsigned long mpol_threshold = 0; -static unsigned long heap_extension = (4*1024); +static unsigned long heap_extension = -1; static int profile = 0; static int disable_sched_yield = 0; static long stack_premap = (2ULL << 20); @@ -2234,6 +2234,10 @@ int main(int argc, char **argv) } } + if (heap_extension == -1) { + heap_extension = sysconf(_SC_PAGESIZE); + } + if (optind >= argc) { print_usage(argv); exit(EXIT_FAILURE);