1*16575Ssam /* param.c 6.4 84/06/06 */ 23124Swnj 33124Swnj #include "../h/param.h" 43124Swnj #include "../h/systm.h" 54668Swnj #include "../h/socket.h" 63124Swnj #include "../h/dir.h" 73124Swnj #include "../h/user.h" 83124Swnj #include "../h/proc.h" 93124Swnj #include "../h/text.h" 103124Swnj #include "../h/inode.h" 113124Swnj #include "../h/file.h" 123124Swnj #include "../h/callout.h" 133124Swnj #include "../h/clist.h" 143124Swnj #include "../h/cmap.h" 154824Swnj #include "../h/mbuf.h" 1615802Smckusick #include "../h/nami.h" 177638Ssam #include "../h/quota.h" 188229Sroot #include "../h/kernel.h" 193124Swnj /* 203124Swnj * System parameter formulae. 213124Swnj * 223124Swnj * This file is copied into each directory where we compile 233124Swnj * the kernel; it should be modified there to suit local taste 243124Swnj * if necessary. 253124Swnj * 263124Swnj * Compiled with -DHZ=xx -DTIMEZONE=x -DDST=x -DMAXUSERS=xx 273124Swnj */ 283124Swnj 298229Sroot #define HZ 100 303124Swnj int hz = HZ; 318229Sroot int tick = 1000000 / HZ; 328229Sroot struct timezone tz = { TIMEZONE, DST }; 333124Swnj #define NPROC (20 + 8 * MAXUSERS) 343124Swnj int nproc = NPROC; 3515825Smckusick #define NCHSIZE (60 + 2 * MAXUSERS) 3615825Smckusick int nchsize = NCHSIZE; 37*16575Ssam int ntext = 24 + MAXUSERS; 3815825Smckusick int ninode = (NPROC + 16 + MAXUSERS + (2 * NCHSIZE / 3)) + 32; 39*16575Ssam int nfile = 16 * (NPROC + 16 + MAXUSERS) / 10 + 32; 409248Ssam int ncallout = 16 + NPROC; 413124Swnj int nclist = 100 + 16 * MAXUSERS; 423620Sroot int nport = NPROC / 2; 435148Swnj int nmbclusters = NMBCLUSTERS; 449183Ssam #ifdef QUOTA 457638Ssam int nquota = (MAXUSERS * 9)/7 + 3; 467638Ssam int ndquot = (MAXUSERS*NMOUNT)/4 + NPROC; 477638Ssam #endif 483124Swnj 493124Swnj /* 503124Swnj * These are initialized at bootstrap time 513124Swnj * to values dependent on memory size 523124Swnj */ 533124Swnj int nbuf, nswbuf; 543124Swnj 553124Swnj /* 563124Swnj * These have to be allocated somewhere; allocating 573124Swnj * them here forces loader errors if this file is omitted. 583124Swnj */ 593124Swnj struct proc *proc, *procNPROC; 603124Swnj struct text *text, *textNTEXT; 613124Swnj struct inode *inode, *inodeNINODE; 623124Swnj struct file *file, *fileNFILE; 633124Swnj struct callout *callout; 643124Swnj struct cblock *cfree; 653124Swnj struct buf *buf, *swbuf; 663124Swnj short *swsize; 673124Swnj int *swpf; 683124Swnj char *buffers; 693124Swnj struct cmap *cmap, *ecmap; 7015802Smckusick struct nch *nch; 719183Ssam #ifdef QUOTA 727638Ssam struct quota *quota, *quotaNQUOTA; 737638Ssam struct dquot *dquot, *dquotNDQUOT; 747638Ssam #endif 75