1 /* 2 * Copyright (c) 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This software was developed by the Computer Systems Engineering group 6 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and 7 * contributed to Berkeley. 8 * 9 * All advertising materials mentioning features or use of this software 10 * must display the following acknowledgement: 11 * This product includes software developed by the University of 12 * California, Lawrence Berkeley Laboratory. 13 * 14 * %sccs.include.redist.c% 15 * 16 * @(#)vmparam.h 8.1 (Berkeley) 06/11/93 17 * 18 * from: $Header: vmparam.h,v 1.8 93/05/25 09:52:16 torek Exp $ 19 */ 20 21 /* 22 * Machine dependent constants for Sun-4c SPARC 23 */ 24 25 /* 26 * USRTEXT is the start of the user text/data space, while USRSTACK 27 * is the top (end) of the user stack. 28 */ 29 #define USRTEXT 0x2000 /* Start of user text */ 30 #define USRSTACK KERNBASE /* Start of user stack */ 31 32 /* 33 * Virtual memory related constants, all in bytes 34 */ 35 #ifndef MAXTSIZ 36 #define MAXTSIZ (8*1024*1024) /* max text size */ 37 #endif 38 #ifndef DFLDSIZ 39 #define DFLDSIZ (16*1024*1024) /* initial data size limit */ 40 #endif 41 #ifndef MAXDSIZ 42 #define MAXDSIZ (64*1024*1024) /* max data size */ 43 #endif 44 #ifndef DFLSSIZ 45 #define DFLSSIZ (512*1024) /* initial stack size limit */ 46 #endif 47 #ifndef MAXSSIZ 48 #define MAXSSIZ MAXDSIZ /* max stack size */ 49 #endif 50 51 /* 52 * Default sizes of swap allocation chunks (see dmap.h). 53 * The actual values may be changed in vminit() based on MAXDSIZ. 54 * With MAXDSIZ of 16Mb and NDMAP of 38, dmmax will be 1024. 55 * DMMIN should be at least ctod(1) so that vtod() works. 56 * vminit() insures this. 57 */ 58 #define DMMIN 32 /* smallest swap allocation */ 59 #define DMMAX 4096 /* largest potential swap allocation */ 60 #define DMTEXT 1024 /* swap allocation for text */ 61 62 /* 63 * The time for a process to be blocked before being very swappable. 64 * This is a number of seconds which the system takes as being a non-trivial 65 * amount of real time. You probably shouldn't change this; 66 * it is used in subtle ways (fractions and multiples of it are, that is, like 67 * half of a ``long time'', almost a long time, etc.) 68 * It is related to human patience and other factors which don't really 69 * change over time. 70 */ 71 #define MAXSLP 20 72 73 /* 74 * A swapped in process is given a small amount of core without being bothered 75 * by the page replacement algorithm. Basically this says that if you are 76 * swapped in you deserve some resources. We protect the last SAFERSS 77 * pages against paging and will just swap you out rather than paging you. 78 * Note that each process has at least UPAGES+CLSIZE pages which are not 79 * paged anyways (this is currently 8+2=10 pages or 5k bytes), so this 80 * number just means a swapped in process is given around 25k bytes. 81 * Just for fun: current memory prices are 4600$ a megabyte on VAX (4/22/81), 82 * so we loan each swapped in process memory worth 100$, or just admit 83 * that we don't consider it worthwhile and swap it out to disk which costs 84 * $30/mb or about $0.75. 85 */ 86 #define SAFERSS 4 /* nominal ``small'' resident set size 87 protected against replacement */ 88 89 /* 90 * Mach derived constants 91 */ 92 93 /* 94 * User/kernel map constants. Note that sparc/vaddrs.h defines the 95 * IO space virtual base, which must be the same as VM_MAX_KERNEL_ADDRESS: 96 * tread with care. 97 */ 98 #define VM_MIN_ADDRESS ((vm_offset_t)0x2000) /* texts start at 8K */ 99 #define VM_MAX_ADDRESS ((vm_offset_t)KERNBASE) 100 #define VM_MAXUSER_ADDRESS ((vm_offset_t)KERNBASE) 101 #define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)KERNBASE) 102 #define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)0xfe000000) 103 104 /* virtual sizes (bytes) for various kernel submaps */ 105 #define VM_MBUF_SIZE (NMBCLUSTERS*MCLBYTES) 106 #define VM_KMEM_SIZE (NKMEMCLUSTERS*CLBYTES) 107