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