Renamed KSTACK_SIZE to KERNEL_STACK_SIZE, STACK_SIZE to USER_STACK_SIZE,
MAIN_THREAD_STACK_SIZE to USER_MAIN_THREAD_STACK_SIZE. Added support for stack overflow debugging: in userspace, the lower (on x86) 4 pages will be used to detect stack overflows. It's disabled for kernel stacks by default. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10013 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
704d6e100b
commit
9ebc403c77
@ -1,12 +1,17 @@
|
|||||||
/*
|
/*
|
||||||
** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
* Copyright 2002-2004, Axel Dörfler, axeld@pinc-software.de.
|
||||||
** Distributed under the terms of the NewOS License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*
|
||||||
|
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
||||||
|
* Distributed under the terms of the NewOS License.
|
||||||
|
*/
|
||||||
#ifndef _KERNEL_KERNEL_H
|
#ifndef _KERNEL_KERNEL_H
|
||||||
#define _KERNEL_KERNEL_H
|
#define _KERNEL_KERNEL_H
|
||||||
|
|
||||||
|
|
||||||
#include <arch_kernel.h>
|
#include <arch_kernel.h>
|
||||||
|
#include <arch_config.h>
|
||||||
|
|
||||||
|
|
||||||
/* Passed in buffers from user-space shouldn't point into the kernel */
|
/* Passed in buffers from user-space shouldn't point into the kernel */
|
||||||
#define IS_USER_ADDRESS(x) \
|
#define IS_USER_ADDRESS(x) \
|
||||||
@ -16,13 +21,17 @@
|
|||||||
((addr_t)(x) >= KERNEL_BASE && (addr_t)(x) <= KERNEL_TOP)
|
((addr_t)(x) >= KERNEL_BASE && (addr_t)(x) <= KERNEL_TOP)
|
||||||
|
|
||||||
/** Size of the kernel stack */
|
/** Size of the kernel stack */
|
||||||
#define KSTACK_SIZE (B_PAGE_SIZE * 2)
|
#ifndef DEBUG_KERNEL_STACKS
|
||||||
|
# define KERNEL_STACK_SIZE (B_PAGE_SIZE * 2) // 8 kB
|
||||||
|
#else
|
||||||
|
# define KERNEL_STACK_SIZE (B_PAGE_SIZE * 3) // 8 kB + one guard page
|
||||||
|
#endif
|
||||||
|
#define KERNEL_STACK_GUARD_PAGES 1
|
||||||
|
|
||||||
/** Size of the stack given to teams in user space */
|
/** Size of the stack given to teams in user space */
|
||||||
#define MAIN_THREAD_STACK_SIZE (16 * B_PAGE_SIZE) // 64 kB
|
#define USER_MAIN_THREAD_STACK_SIZE (16 * 1024 * 1024) // 16 MB
|
||||||
// BeOS: (16 * 1024 * 1024) // 16 MB
|
#define USER_STACK_SIZE (256 * 1024) // 256 kB
|
||||||
#define STACK_SIZE (16 * B_PAGE_SIZE)
|
#define USER_STACK_GUARD_PAGES 4 // 16 kB
|
||||||
// BeOS: (256 * 1024) // 256 kB
|
|
||||||
|
|
||||||
/** Size of the environmental variables space for a process */
|
/** Size of the environmental variables space for a process */
|
||||||
#define ENV_SIZE (B_PAGE_SIZE * 8)
|
#define ENV_SIZE (B_PAGE_SIZE * 8)
|
||||||
|
Loading…
Reference in New Issue
Block a user