From f06af2e2f897af2a66cb6031c7b7e05770f9271e Mon Sep 17 00:00:00 2001 From: Pawel Dziepak Date: Mon, 16 Sep 2013 23:16:29 +0200 Subject: [PATCH] system: Use B_PAGE_SIZE to define stack sizes As korli suggested use B_PAGE_SIZE for defining stack size related definitions what seems to be more natural for them and also may help if we ever support an architecture with page size different than 4kB. --- headers/private/system/thread_defs.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/headers/private/system/thread_defs.h b/headers/private/system/thread_defs.h index 3d7a3c1654..c2cc881206 100644 --- a/headers/private/system/thread_defs.h +++ b/headers/private/system/thread_defs.h @@ -13,10 +13,10 @@ /** Size of the stack given to teams in user space */ #define USER_STACK_GUARD_SIZE (4 * B_PAGE_SIZE) // 16 kB -#define USER_MAIN_THREAD_STACK_SIZE (16 * 1024 * 1024) // 16 MB -#define USER_STACK_SIZE (256 * 1024) // 256 kB -#define MIN_USER_STACK_SIZE (8 * 1024) // 8 kB -#define MAX_USER_STACK_SIZE (16 * 1024 * 1024) // 16 MB +#define MIN_USER_STACK_SIZE (2 * B_PAGE_SIZE) // 8 kB +#define MAX_USER_STACK_SIZE (4096 * B_PAGE_SIZE) // 16 MB +#define USER_MAIN_THREAD_STACK_SIZE MAX_USER_STACK_SIZE +#define USER_STACK_SIZE (64 * B_PAGE_SIZE) // 256 kB // The type of object a thread blocks on (thread::wait::type, set by