From 5c7d86e4912a87e0603eae7724721d3484a4afb3 Mon Sep 17 00:00:00 2001 From: Elaine Gibson Date: Tue, 5 May 2026 09:44:58 +0100 Subject: [PATCH] headers/thread_defs: increase MAX_USER_STACK_SIZE from 16 MB to 64 MB The Zig compiler uses a lot of stack and crashes if not allowed to do so. Change-Id: I4ab8f38a5f6524f6a381367f788be30f1ff724f1 Reviewed-on: https://review.haiku-os.org/c/haiku/+/10926 Reviewed-by: Adrien Destugues Tested-by: Commit checker robot --- headers/private/system/thread_defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/headers/private/system/thread_defs.h b/headers/private/system/thread_defs.h index 0f032c0f8e..d601cc7b94 100644 --- a/headers/private/system/thread_defs.h +++ b/headers/private/system/thread_defs.h @@ -14,7 +14,7 @@ /** Size of the stack given to teams in user space */ #define USER_STACK_GUARD_SIZE (4 * B_PAGE_SIZE) // 16 kB #define MIN_USER_STACK_SIZE (2 * B_PAGE_SIZE) // 8 kB -#define MAX_USER_STACK_SIZE (4096 * B_PAGE_SIZE) // 16 MB +#define MAX_USER_STACK_SIZE (16384 * B_PAGE_SIZE) // 64 MB #define USER_MAIN_THREAD_STACK_SIZE MAX_USER_STACK_SIZE #define USER_STACK_SIZE (64 * B_PAGE_SIZE) // 256 kB