Page 1 of 1

kernel stack

Posted: Sat Jul 16, 2011 8:19 am
by psnix
hi

4kb is enough size for kernel stack?

is stack size fixed (for kernel)?

Re: kernel stack

Posted: Sat Jul 16, 2011 8:38 am
by Combuster
It all depends. Yes, a fixed 4k is enough for many. Yours truly uses 2K and doesn't use half of it. It is however not enough for the Linux kernel, it's not enough for whomever runs recursive algorithms in kernel space, and it's not enough for whomever stores large arrays on the stack.

Can you prove a constant upper bound on kernel stack usage? Chances are very likely your design has issues if you can't.

Re: kernel stack

Posted: Sat Jul 16, 2011 3:48 pm
by OSwhatever
4Kb is usually enough for most microkernels. Write a pattern into your kernel stack when it is created and you can investigate how much you really use.