vmparam3.h revision 1.2
11.1Sglass
21.1Sglass#define USRTEXT         NBPG
31.1Sglass#define USRSTACK        (0-NBPG)
41.1Sglass
51.1Sglass/*
61.1Sglass * Virtual memory related constants, all in bytes
71.1Sglass */
81.1Sglass#ifndef MAXTSIZ
91.1Sglass#define	MAXTSIZ		(6*1024*1024)		/* max text size */
101.1Sglass#endif
111.1Sglass#ifndef DFLDSIZ
121.1Sglass#define	DFLDSIZ		(8*1024*1024)		/* initial data size limit */
131.1Sglass#endif
141.1Sglass#ifndef MAXDSIZ
151.1Sglass#define	MAXDSIZ		(16*1024*1024)		/* max data size */
161.1Sglass#endif
171.1Sglass#ifndef	DFLSSIZ
181.1Sglass#define	DFLSSIZ		(512*1024)		/* initial stack size limit */
191.1Sglass#endif
201.1Sglass#ifndef	MAXSSIZ
211.1Sglass#define	MAXSSIZ		MAXDSIZ			/* max stack size */
221.1Sglass#endif
231.1Sglass
241.1Sglass/*
251.1Sglass * Default sizes of swap allocation chunks (see dmap.h).
261.1Sglass * The actual values may be changed in vminit() based on MAXDSIZ.
271.1Sglass * With MAXDSIZ of 16Mb and NDMAP of 38, dmmax will be 1024.
281.1Sglass * DMMIN should be at least ctod(1) so that vtod() works.
291.1Sglass * vminit() insures this.
301.1Sglass */
311.1Sglass#define	DMMIN	32			/* smallest swap allocation */
321.1Sglass#define	DMMAX	4096			/* largest potential swap allocation */
331.1Sglass
341.1Sglass/*
351.1Sglass * The time for a process to be blocked before being very swappable.
361.1Sglass * This is a number of seconds which the system takes as being a non-trivial
371.1Sglass * amount of real time.  You probably shouldn't change this;
381.1Sglass * it is used in subtle ways (fractions and multiples of it are, that is, like
391.1Sglass * half of a ``long time'', almost a long time, etc.)
401.1Sglass * It is related to human patience and other factors which don't really
411.1Sglass * change over time.
421.1Sglass */
431.1Sglass#define	MAXSLP 		20
441.1Sglass
451.1Sglass/*
461.1Sglass * A swapped in process is given a small amount of core without being bothered
471.1Sglass * by the page replacement algorithm.  Basically this says that if you are
481.1Sglass * swapped in you deserve some resources.  We protect the last SAFERSS
491.1Sglass * pages against paging and will just swap you out rather than paging you.
501.1Sglass * Note that each process has at least UPAGES+CLSIZE pages which are not
511.1Sglass * paged anyways (this is currently 8+2=10 pages or 5k bytes), so this
521.1Sglass * number just means a swapped in process is given around 25k bytes.
531.1Sglass * Just for fun: current memory prices are 4600$ a megabyte on VAX (4/22/81),
541.1Sglass * so we loan each swapped in process memory worth 100$, or just admit
551.1Sglass * that we don't consider it worthwhile and swap it out to disk which costs
561.1Sglass * $30/mb or about $0.75.
571.1Sglass */
581.1Sglass#define	SAFERSS		4		/* nominal ``small'' resident set size
591.1Sglass					   protected against replacement */
601.1Sglass
611.1Sglass
621.1Sglass/*
631.1Sglass * Mach derived constants
641.1Sglass */
651.1Sglass
661.1Sglass/* user/kernel map constants */
671.1Sglass#define VM_MIN_ADDRESS		((vm_offset_t)0)
681.2Sglass#define VM_MAXUSER_ADDRESS	((vm_offset_t)0x0E000000)
691.1Sglass#define VM_MAX_ADDRESS		((vm_offset_t)0xFFF00000)
701.1Sglass#define VM_MIN_KERNEL_ADDRESS	((vm_offset_t)0x0E004000)
711.1Sglass#define VM_MAX_KERNEL_ADDRESS	((vm_offset_t)0xFFFFF000)
721.1Sglass
731.1Sglass/* virtual sizes (bytes) for various kernel submaps */
741.1Sglass#define VM_MBUF_SIZE		(NMBCLUSTERS*MCLBYTES)
751.1Sglass#define VM_KMEM_SIZE		(NKMEMCLUSTERS*CLBYTES)
761.1Sglass#define VM_PHYS_SIZE		(USRIOSIZE*CLBYTES)
77