BSD 4_3_Net_2 release
[unix-history] / usr / src / sys / i386 / include / param.h
index a5f2da4..bd0c5f5 100644 (file)
@@ -5,9 +5,35 @@
  * This code is derived from software contributed to Berkeley by
  * William Jolitz.
  *
  * This code is derived from software contributed to Berkeley by
  * William Jolitz.
  *
- * %sccs.include.redist.c%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by the University of
+ *     California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
  *
  *
- *     @(#)param.h     5.4 (Berkeley) %G%
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *     @(#)param.h     5.8 (Berkeley) 6/28/91
  */
 
 /*
  */
 
 /*
 
 #define MACHINE "i386"
 
 
 #define MACHINE "i386"
 
+/*
+ * Round p (pointer or byte index) up to a correctly-aligned value
+ * for all data types (int, long, ...).   The result is u_int and
+ * must be cast to any desired pointer type.
+ */
+#define        ALIGN(p)        (((u_int)(p) + (sizeof(int) - 1)) &~ (sizeof(int) - 1))
+
 #define        NBPG            4096            /* bytes/page */
 #define        PGOFSET         (NBPG-1)        /* byte offset into page */
 #define        PGSHIFT         12              /* LOG2(NBPG) */
 #define        NBPG            4096            /* bytes/page */
 #define        PGOFSET         (NBPG-1)        /* byte offset into page */
 #define        PGSHIFT         12              /* LOG2(NBPG) */
@@ -36,6 +69,7 @@
 #define        CLSIZE          1
 #define        CLSIZELOG2      0
 
 #define        CLSIZE          1
 #define        CLSIZELOG2      0
 
+/* NOTE: SSIZE, SINCR and UPAGES must be multiples of CLSIZE */
 #define        SSIZE   1               /* initial stack size/NBPG */
 #define        SINCR   1               /* increment of stack/NBPG */
 
 #define        SSIZE   1               /* initial stack size/NBPG */
 #define        SINCR   1               /* increment of stack/NBPG */
 
@@ -64,7 +98,7 @@
  * Size of kernel malloc arena in CLBYTES-sized logical pages
  */ 
 #ifndef NKMEMCLUSTERS
  * Size of kernel malloc arena in CLBYTES-sized logical pages
  */ 
 #ifndef NKMEMCLUSTERS
-#define        NKMEMCLUSTERS   (512*1024/CLBYTES)
+#define        NKMEMCLUSTERS   (2048*1024/CLBYTES)
 #endif
 /*
  * Some macros for units conversion
 #endif
 /*
  * Some macros for units conversion
@@ -115,6 +149,6 @@ int cpuspeed;
 #endif
 #define        DELAY(n)        { register int N = cpuspeed * (n); while (--N > 0); }
 
 #endif
 #define        DELAY(n)        { register int N = cpuspeed * (n); while (--N > 0); }
 
-#else KERNEL
+#else
 #define        DELAY(n)        { register int N = (n); while (--N > 0); }
 #define        DELAY(n)        { register int N = (n); while (--N > 0); }
-#endif KERNEL
+#endif