Home | History | Annotate | Line # | Download | only in include
vmparam.h revision 1.1
      1 
      2 #define USRTEXT         NBPG
      3 #define USRSTACK        (0-NBPG)
      4 
      5 /*
      6  * Virtual memory related constants, all in bytes
      7  */
      8 #ifndef MAXTSIZ
      9 #define	MAXTSIZ		(6*1024*1024)		/* max text size */
     10 #endif
     11 #ifndef DFLDSIZ
     12 #define	DFLDSIZ		(8*1024*1024)		/* initial data size limit */
     13 #endif
     14 #ifndef MAXDSIZ
     15 #define	MAXDSIZ		(16*1024*1024)		/* max data size */
     16 #endif
     17 #ifndef	DFLSSIZ
     18 #define	DFLSSIZ		(512*1024)		/* initial stack size limit */
     19 #endif
     20 #ifndef	MAXSSIZ
     21 #define	MAXSSIZ		MAXDSIZ			/* max stack size */
     22 #endif
     23 
     24 /*
     25  * Default sizes of swap allocation chunks (see dmap.h).
     26  * The actual values may be changed in vminit() based on MAXDSIZ.
     27  * With MAXDSIZ of 16Mb and NDMAP of 38, dmmax will be 1024.
     28  * DMMIN should be at least ctod(1) so that vtod() works.
     29  * vminit() insures this.
     30  */
     31 #define	DMMIN	32			/* smallest swap allocation */
     32 #define	DMMAX	4096			/* largest potential swap allocation */
     33 
     34 /*
     35  * The time for a process to be blocked before being very swappable.
     36  * This is a number of seconds which the system takes as being a non-trivial
     37  * amount of real time.  You probably shouldn't change this;
     38  * it is used in subtle ways (fractions and multiples of it are, that is, like
     39  * half of a ``long time'', almost a long time, etc.)
     40  * It is related to human patience and other factors which don't really
     41  * change over time.
     42  */
     43 #define	MAXSLP 		20
     44 
     45 /*
     46  * A swapped in process is given a small amount of core without being bothered
     47  * by the page replacement algorithm.  Basically this says that if you are
     48  * swapped in you deserve some resources.  We protect the last SAFERSS
     49  * pages against paging and will just swap you out rather than paging you.
     50  * Note that each process has at least UPAGES+CLSIZE pages which are not
     51  * paged anyways (this is currently 8+2=10 pages or 5k bytes), so this
     52  * number just means a swapped in process is given around 25k bytes.
     53  * Just for fun: current memory prices are 4600$ a megabyte on VAX (4/22/81),
     54  * so we loan each swapped in process memory worth 100$, or just admit
     55  * that we don't consider it worthwhile and swap it out to disk which costs
     56  * $30/mb or about $0.75.
     57  */
     58 #define	SAFERSS		4		/* nominal ``small'' resident set size
     59 					   protected against replacement */
     60 
     61 
     62 /*
     63  * Mach derived constants
     64  */
     65 
     66 /* user/kernel map constants */
     67 #define VM_MIN_ADDRESS		((vm_offset_t)0)
     68 #define VM_MAXUSER_ADDRESS	((vm_offset_t)0xFFF00000)
     69 #define VM_MAX_ADDRESS		((vm_offset_t)0xFFF00000)
     70 #define VM_MIN_KERNEL_ADDRESS	((vm_offset_t)0x0E004000)
     71 #define VM_MAX_KERNEL_ADDRESS	((vm_offset_t)0xFFFFF000)
     72 
     73 /* virtual sizes (bytes) for various kernel submaps */
     74 #define VM_MBUF_SIZE		(NMBCLUSTERS*MCLBYTES)
     75 #define VM_KMEM_SIZE		(NKMEMCLUSTERS*CLBYTES)
     76 #define VM_PHYS_SIZE		(USRIOSIZE*CLBYTES)
     77