From ef6aae4a39a3bb6bff534b5c0b8f73b7b56fe8a1 Mon Sep 17 00:00:00 2001 From: Matheus Date: Tue, 11 Oct 2022 23:32:55 -0300 Subject: [PATCH] elf: increase stack size of new processes to around 8 mb --- src/sys/sched/elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sys/sched/elf.c b/src/sys/sched/elf.c index 13c72961..4b884caf 100644 --- a/src/sys/sched/elf.c +++ b/src/sys/sched/elf.c @@ -111,7 +111,7 @@ static void* stacksetup(char** argv, char** env, auxv64_list auxv){ // allocate memory for the initial section of the stack // XXX demand alloc the non initialised stack pages - if(!vmm_allocnowat(STACK_TOP - initialsize - PAGE_SIZE*200, ARCH_MMU_MAP_READ | ARCH_MMU_MAP_WRITE | ARCH_MMU_MAP_NOEXEC | ARCH_MMU_MAP_USER, initialsize + PAGE_SIZE*200)) return NULL; + if(!vmm_allocnowat(STACK_TOP - initialsize - PAGE_SIZE*2000, ARCH_MMU_MAP_READ | ARCH_MMU_MAP_WRITE | ARCH_MMU_MAP_NOEXEC | ARCH_MMU_MAP_USER, initialsize + PAGE_SIZE*2000)) return NULL; // get the addresses to copy the data to