#include <vm/vm_param.h> instead of <machine/vmparam.h> (the former

includes the latter, but also declares variables which are defined
in kern/subr_param.c).

Change som VM parameters from quad_t to unsigned long.  They refer to
quantities (size limits for text, heap and stack segments) which must
necessarily be smaller than the size of the address space, so long is
adequate on all platforms.

MFC after:	1 week
This commit is contained in:
Dag-Erling Smørgrav 2004-11-08 18:20:02 +00:00
parent 39fb485701
commit 7419d1e25f
2 changed files with 23 additions and 23 deletions

View File

@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$");
#include <sys/systm.h>
#include <sys/kernel.h>
#include <machine/vmparam.h>
#include <vm/vm_param.h>
/*
* System parameter formulae.
@ -77,15 +77,15 @@ int maxfilesperproc; /* per-proc open files limit */
int ncallout; /* maximum # of timer events */
int nbuf;
int nswbuf;
int maxswzone; /* max swmeta KVA storage */
int maxbcache; /* max buffer cache KVA storage */
long maxswzone; /* max swmeta KVA storage */
long maxbcache; /* max buffer cache KVA storage */
int maxpipekva; /* Limit on pipe KVA */
u_quad_t maxtsiz; /* max text size */
u_quad_t dfldsiz; /* initial data size limit */
u_quad_t maxdsiz; /* max data size */
u_quad_t dflssiz; /* initial stack size limit */
u_quad_t maxssiz; /* max stack size */
u_quad_t sgrowsiz; /* amount to grow stack */
u_long maxtsiz; /* max text size */
u_long dfldsiz; /* initial data size limit */
u_long maxdsiz; /* max data size */
u_long dflssiz; /* initial stack size limit */
u_long maxssiz; /* max stack size */
u_long sgrowsiz; /* amount to grow stack */
/*
* These have to be allocated somewhere; allocating
@ -108,24 +108,24 @@ init_param1(void)
#ifdef VM_SWZONE_SIZE_MAX
maxswzone = VM_SWZONE_SIZE_MAX;
#endif
TUNABLE_INT_FETCH("kern.maxswzone", &maxswzone);
TUNABLE_LONG_FETCH("kern.maxswzone", &maxswzone);
#ifdef VM_BCACHE_SIZE_MAX
maxbcache = VM_BCACHE_SIZE_MAX;
#endif
TUNABLE_INT_FETCH("kern.maxbcache", &maxbcache);
TUNABLE_LONG_FETCH("kern.maxbcache", &maxbcache);
maxtsiz = MAXTSIZ;
TUNABLE_QUAD_FETCH("kern.maxtsiz", &maxtsiz);
TUNABLE_ULONG_FETCH("kern.maxtsiz", &maxtsiz);
dfldsiz = DFLDSIZ;
TUNABLE_QUAD_FETCH("kern.dfldsiz", &dfldsiz);
TUNABLE_ULONG_FETCH("kern.dfldsiz", &dfldsiz);
maxdsiz = MAXDSIZ;
TUNABLE_QUAD_FETCH("kern.maxdsiz", &maxdsiz);
TUNABLE_ULONG_FETCH("kern.maxdsiz", &maxdsiz);
dflssiz = DFLSSIZ;
TUNABLE_QUAD_FETCH("kern.dflssiz", &dflssiz);
TUNABLE_ULONG_FETCH("kern.dflssiz", &dflssiz);
maxssiz = MAXSSIZ;
TUNABLE_QUAD_FETCH("kern.maxssiz", &maxssiz);
TUNABLE_ULONG_FETCH("kern.maxssiz", &maxssiz);
sgrowsiz = SGROWSIZ;
TUNABLE_QUAD_FETCH("kern.sgrowsiz", &sgrowsiz);
TUNABLE_ULONG_FETCH("kern.sgrowsiz", &sgrowsiz);
}
/*

View File

@ -130,12 +130,12 @@ struct xswdev {
#ifdef _KERNEL
#define num_pages(x) \
((vm_offset_t)((((vm_offset_t)(x)) + PAGE_MASK) >> PAGE_SHIFT))
extern u_quad_t maxtsiz;
extern u_quad_t dfldsiz;
extern u_quad_t maxdsiz;
extern u_quad_t dflssiz;
extern u_quad_t maxssiz;
extern u_quad_t sgrowsiz;
extern unsigned long maxtsiz;
extern unsigned long dfldsiz;
extern unsigned long maxdsiz;
extern unsigned long dflssiz;
extern unsigned long maxssiz;
extern unsigned long sgrowsiz;
#endif /* _KERNEL */
#endif /* ASSEMBLER */
#endif /* _VM_PARAM_ */