zero f_inode when files allocated, so no trashy pointers for PORTs
[unix-history] / usr / src / sys / conf / param.c
CommitLineData
fc814008 1/* param.c 4.4 81/05/12 */
ec6f91b0
BJ
2
3#include "../h/param.h"
4#include "../h/systm.h"
fc814008
BJ
5#ifdef BBNNET
6#include "../bbnnet/net.h"
7#include "../bbnnet/imp.h"
8#include "../bbnnet/ucb.h"
9#endif BBNNET
ec6f91b0
BJ
10#include "../h/dir.h"
11#include "../h/user.h"
12#include "../h/proc.h"
13#include "../h/text.h"
14#include "../h/inode.h"
15#include "../h/file.h"
16#include "../h/callout.h"
17#include "../h/clist.h"
18#include "../h/cmap.h"
ef49a333 19#include "../h/port.h"
ec6f91b0
BJ
20/*
21 * System parameter formulae.
22 *
23 * This file is copied into each directory where we compile
24 * the kernel; it should be modified there to suit local taste
25 * if necessary.
26 *
27 * Compiled with -DHZ=xx -DTIMEZONE=x -DDST=x -DMAXUSERS=xx
28 */
29
30int hz = HZ;
31int timezone = TIMEZONE;
32int dstflag = DST;
33#define NPROC (20 + 8 * MAXUSERS)
34int nproc = NPROC;
35int ntext = 24 + MAXUSERS;
4aef8eda 36int ninode = (NPROC + 16 + MAXUSERS) + 32;
ec6f91b0
BJ
37int nfile = 8 * (NPROC + 16 + MAXUSERS) / 10;
38int ncallout = 16 + MAXUSERS;
39int nclist = 100 + 16 * MAXUSERS;
ef49a333 40int nport = NPROC / 2;
fc814008
BJ
41#ifdef BBNNET
42int nnetpages = NNETPAGES;
43int nwork = NWORK;
44int nnetcon = NCON;
45int nhost = NHOST;
46#endif BBNNET
ec6f91b0
BJ
47
48/*
49 * These are initialized at bootstrap time
50 * to values dependent on memory size
51 */
52int nbuf, nswbuf;
53
54/*
55 * These have to be allocated somewhere; allocating
56 * them here forces loader errors if this file is omitted.
57 */
58struct proc *proc, *procNPROC;
59struct text *text, *textNTEXT;
60struct inode *inode, *inodeNINODE;
61struct file *file, *fileNFILE;
62struct callout *callout;
63struct cblock *cfree;
ec6f91b0
BJ
64struct buf *buf, *swbuf;
65short *swsize;
66int *swpf;
67char *buffers;
68struct cmap *cmap, *ecmap;
fc814008
BJ
69#ifdef BBNNET
70struct pfree *freetab;
71struct work *workfree, *workNWORK;
72struct ucb *contab, *conNCON;
73struct host *host, *hostNHOST;
74struct net netcb;
75struct net_stat netstat;
76struct impstat imp_stat;
77#endif BBNNET