add basic data types
[unix-history] / usr / src / sys / vax / include / vmparam.h
index a644605..0d927be 100644 (file)
@@ -1,4 +1,11 @@
-/*     vmparam.h       6.4     85/03/07        */
+/*-
+ * Copyright (c) 1982, 1986 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * %sccs.include.proprietary.c%
+ *
+ *     @(#)vmparam.h   7.4 (Berkeley) %G%
+ */
 
 /*
  * Machine dependent constants for VAX
 
 /*
  * Machine dependent constants for VAX
 #define        HIGHPAGES       UPAGES
 
 /*
 #define        HIGHPAGES       UPAGES
 
 /*
- * Virtual memory related constants
+ * Virtual memory related constants, all in bytes
  */
  */
-#define        SLOP    32
-#define        MAXTSIZ         (6*2048-SLOP)           /* max text size (clicks) */
+#ifndef MAXTSIZ
+#define        MAXTSIZ         (6*1024*1024)           /* max text size */
+#endif
+#ifndef DFLDSIZ
+#define        DFLDSIZ         (6*1024*1024)           /* initial data size limit */
+#endif
 #ifndef MAXDSIZ
 #ifndef MAXDSIZ
-#define        MAXDSIZ         (12*1024-32-SLOP)       /* max data size (clicks) */
+#define        MAXDSIZ         (16*1024*1024)          /* max data size */
 #endif
 #endif
-#define        MAXSSIZ         (12*1024-32-SLOP)       /* max stack size (clicks) */
+#ifndef        DFLSSIZ
+#define        DFLSSIZ         (512*1024)              /* initial stack size limit */
+#endif
+#ifndef        MAXSSIZ
+#define        MAXSSIZ         MAXDSIZ                 /* max stack size */
+#endif
+
+/*
+ * Default sizes of swap allocation chunks (see dmap.h).
+ * The actual values may be changed in vminit() based on MAXDSIZ.
+ * With MAXDSIZ of 16Mb and NDMAP of 38, dmmax will be 1024.
+ * DMMIN should be at least ctod(1) so that vtod() works.
+ * vminit() ensures this.
+ */
+#define        DMMIN   32                      /* smallest swap allocation */
+#define        DMMAX   4096                    /* largest potential swap allocation */
+#define        DMTEXT  1024                    /* swap allocation for text */
 
 /*
  * Sizes of the system and user portions of the system page table.
  */
 /* SYSPTSIZE IS SILLY; IT SHOULD BE COMPUTED AT BOOT TIME */
 #define        SYSPTSIZE       ((20+MAXUSERS)*NPTEPG)
 
 /*
  * Sizes of the system and user portions of the system page table.
  */
 /* SYSPTSIZE IS SILLY; IT SHOULD BE COMPUTED AT BOOT TIME */
 #define        SYSPTSIZE       ((20+MAXUSERS)*NPTEPG)
-#define        USRPTSIZE       (8*NPTEPG)
+#define        USRPTSIZE       (32*NPTEPG)
+
+/*
+ * PTEs for system V compatible shared memory.
+ * This is basically slop for kmempt which we actually allocate (malloc) from.
+ */
+#define SHMMAXPGS      1024
+
+/*
+ * Boundary at which to place first MAPMEM segment if not explicitly
+ * specified.  Should be a power of two.  This allows some slop for
+ * the data segment to grow underneath the first mapped segment.
+ */
+#define MMSEG          0x200000
 
 /*
  * The size of the clock loop.
 
 /*
  * The size of the clock loop.
  * larger than it really is.
  *
  * KLMAX gives maximum cluster size in CLSIZE page (cluster-page)
  * larger than it really is.
  *
  * KLMAX gives maximum cluster size in CLSIZE page (cluster-page)
- * units.  Note that KLMAX*CLSIZE must be <= DMMIN in dmap.h.
+ * units.  Note that ctod(KLMAX*CLSIZE) must be <= DMMIN in dmap.h.
+ * ctob(KLMAX) should also be less than MAXPHYS (in vm_swp.c) to
+ * avoid "big push" panics.
  */
 
 #define        KLMAX   (32/CLSIZE)
  */
 
 #define        KLMAX   (32/CLSIZE)
  */
 #define        LOTSOFMEM       2
 
  */
 #define        LOTSOFMEM       2
 
-/*
- * BEWARE THIS DEFINITION WORKS ONLY WITH COUNT OF 1
- */
-#define        mapin(pte, v, pfnum, count, prot) \
-       (*(int *)(pte) = (pfnum) | (prot), mtpr(TBIS, ptob(v)))
+#define        mapin(pte, v, pfnum, prot) \
+       (*(int *)(pte) = (pfnum) | (prot), mtpr(TBIS, v))