1 /* 2 * Copyright (c) 1991 Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 * 7 * @(#)vm.h 7.2 (Berkeley) 08/28/91 8 */ 9 10 #ifndef VM_H 11 #define VM_H 12 #include <vm/vm_param.h> 13 #include <vm/lock.h> 14 #include <vm/queue.h> 15 #include <vm/vm_prot.h> 16 #include <vm/vm_inherit.h> 17 #include <vm/vm_map.h> 18 #include <vm/vm_object.h> 19 #include <vm/pmap.h> 20 #include <sys/vmmeter.h> 21 22 /* 23 * Shareable process virtual address space. 24 * May eventually be merged with vm_map. 25 * Several fields are temporary (text, data stuff). 26 */ 27 struct vmspace { 28 struct vm_map vm_map; /* VM address map */ 29 struct pmap vm_pmap; /* private physical map */ 30 int vm_refcnt; /* number of references */ 31 caddr_t vm_shm; /* SYS5 shared memory private data XXX */ 32 /* we copy from vm_startcopy to the end of the structure on fork */ 33 #define vm_startcopy vm_rssize 34 segsz_t vm_rssize; /* current resident set size in pages */ 35 segsz_t vm_swrss; /* resident set size before last swap */ 36 segsz_t vm_tsize; /* text size (pages) XXX */ 37 segsz_t vm_dsize; /* data size (pages) XXX */ 38 segsz_t vm_ssize; /* stack size (pages) */ 39 caddr_t vm_taddr; /* user virtual address of text XXX */ 40 caddr_t vm_daddr; /* user virtual address of data XXX */ 41 caddr_t vm_maxsaddr; /* user VA at max stack growth */ 42 }; 43 44 struct vmspace *vmspace_alloc __P((vm_offset_t min, vm_offset_t max, 45 int pageable)); 46 struct vmspace *vmspace_fork __P((struct vmspace *)); 47 void vmspace_free __P((struct vmspace *)); 48 #endif /* VM_H */ 49