diff options
-rw-r--r-- | sys/kern/kern_proc.c | 6 | ||||
-rw-r--r-- | sys/sys/systm.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index b4091e7..61be8de 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -35,6 +35,7 @@ */ #include "opt_ktrace.h" +#include "opt_kstack_pages.h" #include <sys/param.h> #include <sys/systm.h> @@ -101,6 +102,11 @@ static int active_procs; static int cached_procs; static int allocated_procs; +int kstack_pages = KSTACK_PAGES; +int uarea_pages = UAREA_PAGES; +SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, &kstack_pages, 0, ""); +SYSCTL_INT(_kern, OID_AUTO, uarea_pages, CTLFLAG_RD, &uarea_pages, 0, ""); + #define RANGEOF(type, start, end) (offsetof(type, end) - offsetof(type, start)) CTASSERT(sizeof(struct kinfo_proc) == KINFO_PROC_SIZE); diff --git a/sys/sys/systm.h b/sys/sys/systm.h index e9d8f8f..e3b3a2a 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -54,6 +54,8 @@ extern int cold; /* nonzero if we are doing a cold boot */ extern const char *panicstr; /* panic message */ extern char version[]; /* system version */ extern char copyright[]; /* system copyright */ +extern int kstack_pages; /* number of kernel stack pages */ +extern int uarea_pages; /* number of user struct pages */ extern int nswap; /* size of swap space */ |