vmparam.h revision 1.4 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 * PTEs for mapping user space into the kernel for phyio operations.
36 * [this figure is based on the assumption that you can put ptes in real
37 * memory. this is a false assumption on a sun3]
38 *
39 */
40 #ifndef USRIOSIZE
41 #define USRIOSIZE 1
42 #endif
43
44 /*
45 * The time for a process to be blocked before being very swappable.
46 * This is a number of seconds which the system takes as being a non-trivial
47 * amount of real time. You probably shouldn't change this;
48 * it is used in subtle ways (fractions and multiples of it are, that is, like
49 * half of a ``long time'', almost a long time, etc.)
50 * It is related to human patience and other factors which don't really
51 * change over time.
52 */
53 #define MAXSLP 20
54
55 /*
56 * A swapped in process is given a small amount of core without being bothered
57 * by the page replacement algorithm. Basically this says that if you are
58 * swapped in you deserve some resources. We protect the last SAFERSS
59 * pages against paging and will just swap you out rather than paging you.
60 * Note that each process has at least UPAGES+CLSIZE pages which are not
61 * paged anyways (this is currently 8+2=10 pages or 5k bytes), so this
62 * number just means a swapped in process is given around 25k bytes.
63 * Just for fun: current memory prices are 4600$ a megabyte on VAX (4/22/81),
64 * so we loan each swapped in process memory worth 100$, or just admit
65 * that we don't consider it worthwhile and swap it out to disk which costs
66 * $30/mb or about $0.75.
67 */
68 #define SAFERSS 4 /* nominal ``small'' resident set size
69 protected against replacement */
70
71
72 /*
73 * Mach derived constants
74 */
75
76 /* user/kernel map constants */
77 #define VM_MIN_ADDRESS ((vm_offset_t)0)
78 #define VM_MAXUSER_ADDRESS ((vm_offset_t)0x0E000000)
79 #define VM_MAX_ADDRESS ((vm_offset_t)0xFFF00000)
80 #define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)0x0E004000)
81 #define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)0x0FE00000) /* mon start */
82
83 /* virtual sizes (bytes) for various kernel submaps */
84 #define VM_MBUF_SIZE (NMBCLUSTERS*MCLBYTES)
85 #define VM_KMEM_SIZE (NKMEMCLUSTERS*CLBYTES)
86 #define VM_PHYS_SIZE (USRIOSIZE*CLBYTES)
87