from Jerry Berkman
[unix-history] / usr / src / sys / conf / param.c
CommitLineData
e0be43f9 1/* param.c 6.9 85/04/17 */
ec6f91b0
BJ
2
3#include "../h/param.h"
4#include "../h/systm.h"
751b301e 5#include "../h/socket.h"
ec6f91b0
BJ
6#include "../h/dir.h"
7#include "../h/user.h"
8#include "../h/proc.h"
9#include "../h/text.h"
10#include "../h/inode.h"
11#include "../h/file.h"
12#include "../h/callout.h"
13#include "../h/clist.h"
14#include "../h/cmap.h"
01966f05 15#include "../h/mbuf.h"
ab12a1f4 16#include "../h/quota.h"
bf75e5ce 17#include "../h/kernel.h"
ec6f91b0
BJ
18/*
19 * System parameter formulae.
20 *
21 * This file is copied into each directory where we compile
22 * the kernel; it should be modified there to suit local taste
23 * if necessary.
24 *
25 * Compiled with -DHZ=xx -DTIMEZONE=x -DDST=x -DMAXUSERS=xx
26 */
27
bf75e5ce 28#define HZ 100
ec6f91b0 29int hz = HZ;
bf75e5ce 30int tick = 1000000 / HZ;
fab05fec 31int tickadj = 1000000 / HZ / 10;
bf75e5ce 32struct timezone tz = { TIMEZONE, DST };
ec6f91b0
BJ
33#define NPROC (20 + 8 * MAXUSERS)
34int nproc = NPROC;
e0be43f9 35int ntext = 36 + MAXUSERS;
6835b970
KM
36#define NINODE ((NPROC + 16 + MAXUSERS) + 32)
37int ninode = NINODE;
38int nchsize = NINODE * 11 / 10;
b025a45a 39int nfile = 16 * (NPROC + 16 + MAXUSERS) / 10 + 32;
2067e85f 40int ncallout = 16 + NPROC;
ec6f91b0 41int nclist = 100 + 16 * MAXUSERS;
ef49a333 42int nport = NPROC / 2;
5b3fa994 43int nmbclusters = NMBCLUSTERS;
af0b24db 44#ifdef QUOTA
72d2d310
KM
45int nquota = (MAXUSERS * 9) / 7 + 3;
46int ndquot = NINODE + (MAXUSERS * NMOUNT) / 4;
ab12a1f4 47#endif
ec6f91b0
BJ
48
49/*
50 * These are initialized at bootstrap time
51 * to values dependent on memory size
52 */
53int nbuf, nswbuf;
54
55/*
56 * These have to be allocated somewhere; allocating
57 * them here forces loader errors if this file is omitted.
58 */
59struct proc *proc, *procNPROC;
60struct text *text, *textNTEXT;
61struct inode *inode, *inodeNINODE;
62struct file *file, *fileNFILE;
63struct callout *callout;
64struct cblock *cfree;
ec6f91b0
BJ
65struct buf *buf, *swbuf;
66short *swsize;
67int *swpf;
68char *buffers;
69struct cmap *cmap, *ecmap;
f93197fc 70struct nch *nch;
af0b24db 71#ifdef QUOTA
ab12a1f4
SL
72struct quota *quota, *quotaNQUOTA;
73struct dquot *dquot, *dquotNDQUOT;
74#endif