* Changed the meaning of the {KERNEL,USER}_STACK_SIZE macros to not

include the guard pages. Adjusted the kernel and boot loader code
  accordingly -- the guard pages size is added/not removed respectively.
  The stack size passed to _kern_spawn_thread() is now the actually usable
  size, and it is no longer possible to specify a size smaller than or
  equal to the guard pages size.
* vm_create_anonymous_area(): Precommit two pages maximum -- a stack with
  only one page usable size obviously doesn't need two pages.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26819 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2008-08-05 17:19:46 +00:00
parent afa9fe8958
commit 57f2b5a013
14 changed files with 78 additions and 57 deletions
+5 -4
View File
@@ -27,12 +27,13 @@
// At least, you then know that the stack overflows in this case :)
/** Size of the kernel stack */
#ifndef DEBUG_KERNEL_STACKS
# define KERNEL_STACK_SIZE (B_PAGE_SIZE * 3) // 12 kB
#define KERNEL_STACK_SIZE (B_PAGE_SIZE * 3) // 12 kB
#ifdef DEBUG_KERNEL_STACKS
# define KERNEL_STACK_GUARD_PAGES 1
#else
# define KERNEL_STACK_SIZE (B_PAGE_SIZE * 4) // 12 kB + one guard page
# define KERNEL_STACK_GUARD_PAGES 0
#endif
#define KERNEL_STACK_GUARD_PAGES 1
/** Size of the environmental variables space for a process */
#define ENV_SIZE (B_PAGE_SIZE * 8)