Kernel: Drop 32 bit userspace stack to 4 MiB
32 bit userspace only has 256 MiB reserved for stacks, so with 32 MiB stacks it only allowed total of 7 threads. Now we can have up to 62 threads
This commit is contained in:
@@ -38,8 +38,12 @@ namespace Kernel
|
|||||||
// stack overflows on some machines with 8 page stack
|
// stack overflows on some machines with 8 page stack
|
||||||
static constexpr size_t kernel_stack_size { PAGE_SIZE * 16 };
|
static constexpr size_t kernel_stack_size { PAGE_SIZE * 16 };
|
||||||
|
|
||||||
// TODO: userspace stack is hard limited to 32 MiB, maybe make this dynamic?
|
// TODO: userspace stack size is hard limited, maybe make this dynamic?
|
||||||
|
#if ARCH(x86_64)
|
||||||
static constexpr size_t userspace_stack_size { 32 << 20 };
|
static constexpr size_t userspace_stack_size { 32 << 20 };
|
||||||
|
#elif ARCH(i686)
|
||||||
|
static constexpr size_t userspace_stack_size { 4 << 20 };
|
||||||
|
#endif
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static BAN::ErrorOr<Thread*> create_kernel(entry_t, void*);
|
static BAN::ErrorOr<Thread*> create_kernel(entry_t, void*);
|
||||||
|
|||||||
Reference in New Issue
Block a user