xref: /freebsd/sys/vm/vm.h (revision df8bae1de4b67ccf57f4afebd4e2bf258c38910d)
1df8bae1dSRodney W. Grimes /*
2df8bae1dSRodney W. Grimes  * Copyright (c) 1991, 1993
3df8bae1dSRodney W. Grimes  *	The Regents of the University of California.  All rights reserved.
4df8bae1dSRodney W. Grimes  *
5df8bae1dSRodney W. Grimes  * Redistribution and use in source and binary forms, with or without
6df8bae1dSRodney W. Grimes  * modification, are permitted provided that the following conditions
7df8bae1dSRodney W. Grimes  * are met:
8df8bae1dSRodney W. Grimes  * 1. Redistributions of source code must retain the above copyright
9df8bae1dSRodney W. Grimes  *    notice, this list of conditions and the following disclaimer.
10df8bae1dSRodney W. Grimes  * 2. Redistributions in binary form must reproduce the above copyright
11df8bae1dSRodney W. Grimes  *    notice, this list of conditions and the following disclaimer in the
12df8bae1dSRodney W. Grimes  *    documentation and/or other materials provided with the distribution.
13df8bae1dSRodney W. Grimes  * 3. All advertising materials mentioning features or use of this software
14df8bae1dSRodney W. Grimes  *    must display the following acknowledgement:
15df8bae1dSRodney W. Grimes  *	This product includes software developed by the University of
16df8bae1dSRodney W. Grimes  *	California, Berkeley and its contributors.
17df8bae1dSRodney W. Grimes  * 4. Neither the name of the University nor the names of its contributors
18df8bae1dSRodney W. Grimes  *    may be used to endorse or promote products derived from this software
19df8bae1dSRodney W. Grimes  *    without specific prior written permission.
20df8bae1dSRodney W. Grimes  *
21df8bae1dSRodney W. Grimes  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22df8bae1dSRodney W. Grimes  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23df8bae1dSRodney W. Grimes  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24df8bae1dSRodney W. Grimes  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25df8bae1dSRodney W. Grimes  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26df8bae1dSRodney W. Grimes  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27df8bae1dSRodney W. Grimes  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28df8bae1dSRodney W. Grimes  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29df8bae1dSRodney W. Grimes  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30df8bae1dSRodney W. Grimes  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31df8bae1dSRodney W. Grimes  * SUCH DAMAGE.
32df8bae1dSRodney W. Grimes  *
33df8bae1dSRodney W. Grimes  *	@(#)vm.h	8.2 (Berkeley) 12/13/93
34df8bae1dSRodney W. Grimes  */
35df8bae1dSRodney W. Grimes 
36df8bae1dSRodney W. Grimes #ifndef VM_H
37df8bae1dSRodney W. Grimes #define VM_H
38df8bae1dSRodney W. Grimes 
39df8bae1dSRodney W. Grimes typedef int vm_inherit_t;		/* XXX: inheritance codes */
40df8bae1dSRodney W. Grimes 
41df8bae1dSRodney W. Grimes union vm_map_object;
42df8bae1dSRodney W. Grimes typedef union vm_map_object vm_map_object_t;
43df8bae1dSRodney W. Grimes 
44df8bae1dSRodney W. Grimes struct vm_map_entry;
45df8bae1dSRodney W. Grimes typedef struct vm_map_entry *vm_map_entry_t;
46df8bae1dSRodney W. Grimes 
47df8bae1dSRodney W. Grimes struct vm_map;
48df8bae1dSRodney W. Grimes typedef struct vm_map *vm_map_t;
49df8bae1dSRodney W. Grimes 
50df8bae1dSRodney W. Grimes struct vm_object;
51df8bae1dSRodney W. Grimes typedef struct vm_object *vm_object_t;
52df8bae1dSRodney W. Grimes 
53df8bae1dSRodney W. Grimes struct vm_page;
54df8bae1dSRodney W. Grimes typedef struct vm_page  *vm_page_t;
55df8bae1dSRodney W. Grimes 
56df8bae1dSRodney W. Grimes struct pager_struct;
57df8bae1dSRodney W. Grimes typedef struct pager_struct *vm_pager_t;
58df8bae1dSRodney W. Grimes 
59df8bae1dSRodney W. Grimes #include <sys/vmmeter.h>
60df8bae1dSRodney W. Grimes #include <sys/queue.h>
61df8bae1dSRodney W. Grimes #include <vm/vm_param.h>
62df8bae1dSRodney W. Grimes #include <vm/lock.h>
63df8bae1dSRodney W. Grimes #include <vm/vm_prot.h>
64df8bae1dSRodney W. Grimes #include <vm/vm_inherit.h>
65df8bae1dSRodney W. Grimes #include <vm/vm_map.h>
66df8bae1dSRodney W. Grimes #include <vm/vm_object.h>
67df8bae1dSRodney W. Grimes #include <vm/pmap.h>
68df8bae1dSRodney W. Grimes #include <vm/vm_extern.h>
69df8bae1dSRodney W. Grimes 
70df8bae1dSRodney W. Grimes /*
71df8bae1dSRodney W. Grimes  * Shareable process virtual address space.
72df8bae1dSRodney W. Grimes  * May eventually be merged with vm_map.
73df8bae1dSRodney W. Grimes  * Several fields are temporary (text, data stuff).
74df8bae1dSRodney W. Grimes  */
75df8bae1dSRodney W. Grimes struct vmspace {
76df8bae1dSRodney W. Grimes 	struct	vm_map vm_map;	/* VM address map */
77df8bae1dSRodney W. Grimes 	struct	pmap vm_pmap;	/* private physical map */
78df8bae1dSRodney W. Grimes 	int	vm_refcnt;	/* number of references */
79df8bae1dSRodney W. Grimes 	caddr_t	vm_shm;		/* SYS5 shared memory private data XXX */
80df8bae1dSRodney W. Grimes /* we copy from vm_startcopy to the end of the structure on fork */
81df8bae1dSRodney W. Grimes #define vm_startcopy vm_rssize
82df8bae1dSRodney W. Grimes 	segsz_t vm_rssize; 	/* current resident set size in pages */
83df8bae1dSRodney W. Grimes 	segsz_t vm_swrss;	/* resident set size before last swap */
84df8bae1dSRodney W. Grimes 	segsz_t vm_tsize;	/* text size (pages) XXX */
85df8bae1dSRodney W. Grimes 	segsz_t vm_dsize;	/* data size (pages) XXX */
86df8bae1dSRodney W. Grimes 	segsz_t vm_ssize;	/* stack size (pages) */
87df8bae1dSRodney W. Grimes 	caddr_t	vm_taddr;	/* user virtual address of text XXX */
88df8bae1dSRodney W. Grimes 	caddr_t	vm_daddr;	/* user virtual address of data XXX */
89df8bae1dSRodney W. Grimes 	caddr_t vm_maxsaddr;	/* user VA at max stack growth */
90df8bae1dSRodney W. Grimes };
91df8bae1dSRodney W. Grimes #endif /* VM_H */
92