1139825Simp/*- 21541Srgrimes * Copyright (c) 1991, 1993 31541Srgrimes * The Regents of the University of California. All rights reserved. 41541Srgrimes * 51541Srgrimes * This code is derived from software contributed to Berkeley by 61541Srgrimes * The Mach Operating System project at Carnegie-Mellon University. 71541Srgrimes * 81541Srgrimes * Redistribution and use in source and binary forms, with or without 91541Srgrimes * modification, are permitted provided that the following conditions 101541Srgrimes * are met: 111541Srgrimes * 1. Redistributions of source code must retain the above copyright 121541Srgrimes * notice, this list of conditions and the following disclaimer. 131541Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 141541Srgrimes * notice, this list of conditions and the following disclaimer in the 151541Srgrimes * documentation and/or other materials provided with the distribution. 161541Srgrimes * 4. Neither the name of the University nor the names of its contributors 171541Srgrimes * may be used to endorse or promote products derived from this software 181541Srgrimes * without specific prior written permission. 191541Srgrimes * 201541Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 211541Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 221541Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 231541Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 241541Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 251541Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 261541Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 271541Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 281541Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 291541Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 301541Srgrimes * SUCH DAMAGE. 311541Srgrimes * 3222521Sdyson * @(#)vm_map.h 8.9 (Berkeley) 5/17/95 331541Srgrimes * 341541Srgrimes * 351541Srgrimes * Copyright (c) 1987, 1990 Carnegie-Mellon University. 361541Srgrimes * All rights reserved. 371541Srgrimes * 381541Srgrimes * Authors: Avadis Tevanian, Jr., Michael Wayne Young 395455Sdg * 401541Srgrimes * Permission to use, copy, modify and distribute this software and 411541Srgrimes * its documentation is hereby granted, provided that both the copyright 421541Srgrimes * notice and this permission notice appear in all copies of the 431541Srgrimes * software, derivative works or modified versions, and any portions 441541Srgrimes * thereof, and that both notices appear in supporting documentation. 455455Sdg * 465455Sdg * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 475455Sdg * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 481541Srgrimes * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 495455Sdg * 501541Srgrimes * Carnegie Mellon requests users of this software to return to 511541Srgrimes * 521541Srgrimes * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 531541Srgrimes * School of Computer Science 541541Srgrimes * Carnegie Mellon University 551541Srgrimes * Pittsburgh PA 15213-3890 561541Srgrimes * 571541Srgrimes * any improvements or extensions that they make and grant Carnegie the 581541Srgrimes * rights to redistribute these changes. 591817Sdg * 6050477Speter * $FreeBSD$ 611541Srgrimes */ 621541Srgrimes 631541Srgrimes/* 641541Srgrimes * Virtual memory map module definitions. 651541Srgrimes */ 661541Srgrimes#ifndef _VM_MAP_ 671541Srgrimes#define _VM_MAP_ 681541Srgrimes 6995686Salc#include <sys/lock.h> 70132880Smux#include <sys/sx.h> 71108518Salc#include <sys/_mutex.h> 7276244Smarkm 731541Srgrimes/* 741541Srgrimes * Types defined: 751541Srgrimes * 761541Srgrimes * vm_map_t the high-level address map data structure. 771541Srgrimes * vm_map_entry_t an entry in an address map. 781541Srgrimes */ 791541Srgrimes 80118771Sbmstypedef u_char vm_flags_t; 8157550Spstypedef u_int vm_eflags_t; 8257550Sps 831541Srgrimes/* 841541Srgrimes * Objects which live in maps may be either VM objects, or 851541Srgrimes * another map (called a "sharing map") which denotes read-write 861541Srgrimes * sharing with other maps. 871541Srgrimes */ 881541Srgrimesunion vm_map_object { 895455Sdg struct vm_object *vm_object; /* object object */ 905455Sdg struct vm_map *sub_map; /* belongs to another map */ 911541Srgrimes}; 921541Srgrimes 931541Srgrimes/* 941541Srgrimes * Address map entries consist of start and end addresses, 951541Srgrimes * a VM object (or sharing map) and offset into that object, 961541Srgrimes * and user-exported inheritance and protection information. 971541Srgrimes * Also included is control information for virtual copy operations. 981541Srgrimes */ 991541Srgrimesstruct vm_map_entry { 1005455Sdg struct vm_map_entry *prev; /* previous entry */ 1015455Sdg struct vm_map_entry *next; /* next entry */ 102103777Salc struct vm_map_entry *left; /* left child in binary search tree */ 103103777Salc struct vm_map_entry *right; /* right child in binary search tree */ 1045455Sdg vm_offset_t start; /* start address */ 1055455Sdg vm_offset_t end; /* end address */ 10642360Sjulian vm_offset_t avail_ssize; /* amt can grow if this is a stack */ 107133636Salc vm_size_t adj_free; /* amount of adjacent free space */ 108133636Salc vm_size_t max_free; /* max free space in subtree */ 1095455Sdg union vm_map_object object; /* object I point to */ 11012767Sdyson vm_ooffset_t offset; /* offset into object */ 11157550Sps vm_eflags_t eflags; /* map entry flags */ 1125455Sdg vm_prot_t protection; /* protection code */ 1135455Sdg vm_prot_t max_protection; /* maximum protection */ 1145455Sdg vm_inherit_t inheritance; /* inheritance */ 115235230Salc uint8_t read_ahead; /* pages in the read-ahead window */ 1165455Sdg int wired_count; /* can be paged if = 0 */ 117235230Salc vm_pindex_t next_read; /* index of the next sequential read */ 118216128Strasz struct ucred *cred; /* tmp storage for creator ref */ 119253190Skib struct thread *wiring_thread; 1201541Srgrimes}; 1211541Srgrimes 12257550Sps#define MAP_ENTRY_NOSYNC 0x0001 12357550Sps#define MAP_ENTRY_IS_SUB_MAP 0x0002 12457550Sps#define MAP_ENTRY_COW 0x0004 12557550Sps#define MAP_ENTRY_NEEDS_COPY 0x0008 12657550Sps#define MAP_ENTRY_NOFAULT 0x0010 12757550Sps#define MAP_ENTRY_USER_WIRED 0x0020 12821754Sdyson 12957550Sps#define MAP_ENTRY_BEHAV_NORMAL 0x0000 /* default behavior */ 13057550Sps#define MAP_ENTRY_BEHAV_SEQUENTIAL 0x0040 /* expect sequential access */ 13157550Sps#define MAP_ENTRY_BEHAV_RANDOM 0x0080 /* expect random access */ 13257550Sps#define MAP_ENTRY_BEHAV_RESERVED 0x00C0 /* future use */ 13349338Salc 13457550Sps#define MAP_ENTRY_BEHAV_MASK 0x00C0 13549338Salc 13698022Salc#define MAP_ENTRY_IN_TRANSITION 0x0100 /* entry being changed */ 13798022Salc#define MAP_ENTRY_NEEDS_WAKEUP 0x0200 /* waiters in transition */ 13857550Sps#define MAP_ENTRY_NOCOREDUMP 0x0400 /* don't include in a core */ 13957550Sps 140119595Smarcel#define MAP_ENTRY_GROWS_DOWN 0x1000 /* Top-down stacks */ 141119595Smarcel#define MAP_ENTRY_GROWS_UP 0x2000 /* Bottom-up stacks */ 142119595Smarcel 143190886Skib#define MAP_ENTRY_WIRE_SKIPPED 0x4000 144232071Skib#define MAP_ENTRY_VN_WRITECNT 0x8000 /* writeable vnode mapping */ 145190886Skib 14697710Salc#ifdef _KERNEL 147121962Sdesstatic __inline u_char 14897710Salcvm_map_entry_behavior(vm_map_entry_t entry) 149121962Sdes{ 15097710Salc return (entry->eflags & MAP_ENTRY_BEHAV_MASK); 15197710Salc} 152133401Sgreen 153133401Sgreenstatic __inline int 154133401Sgreenvm_map_entry_user_wired_count(vm_map_entry_t entry) 155133401Sgreen{ 156133401Sgreen if (entry->eflags & MAP_ENTRY_USER_WIRED) 157133401Sgreen return (1); 158133401Sgreen return (0); 159133401Sgreen} 160133401Sgreen 161133401Sgreenstatic __inline int 162133401Sgreenvm_map_entry_system_wired_count(vm_map_entry_t entry) 163133401Sgreen{ 164133401Sgreen return (entry->wired_count - vm_map_entry_user_wired_count(entry)); 165133401Sgreen} 16697710Salc#endif /* _KERNEL */ 16797710Salc 1681541Srgrimes/* 169103777Salc * A map is a set of map entries. These map entries are 170103777Salc * organized both as a binary search tree and as a doubly-linked 171103777Salc * list. Both structures are ordered based upon the start and 172103777Salc * end addresses contained within each map entry. Sleator and 173103777Salc * Tarjan's top-down splay algorithm is employed to control 174121962Sdes * height imbalance in the binary search tree. 17550247Salc * 17695589Salc * List of locks 17795589Salc * (c) const until freed 1781541Srgrimes */ 1791541Srgrimesstruct vm_map { 18050247Salc struct vm_map_entry header; /* List of entries */ 181132880Smux struct sx lock; /* Lock for map data */ 182108515Salc struct mtx system_mtx; 1835455Sdg int nentries; /* Number of entries */ 1845455Sdg vm_size_t size; /* virtual size */ 185118852Salc u_int timestamp; /* Version number */ 18699754Salc u_char needs_wakeup; 187186633Salc u_char system_map; /* (c) Am I a system map? */ 188118771Sbms vm_flags_t flags; /* flags for this vm_map */ 189103777Salc vm_map_entry_t root; /* Root of a binary search tree */ 19095589Salc pmap_t pmap; /* (c) Physical map */ 19195589Salc#define min_offset header.start /* (c) */ 19295589Salc#define max_offset header.end /* (c) */ 193216335Smlaier int busy; 1941541Srgrimes}; 1951541Srgrimes 196118771Sbms/* 197118771Sbms * vm_flags_t values 198118771Sbms */ 199118771Sbms#define MAP_WIREFUTURE 0x01 /* wire all future pages */ 200216335Smlaier#define MAP_BUSY_WAKEUP 0x02 201118771Sbms 20295589Salc#ifdef _KERNEL 20395589Salcstatic __inline vm_offset_t 204238502Smdfvm_map_max(const struct vm_map *map) 20595589Salc{ 20695589Salc return (map->max_offset); 20795589Salc} 20895589Salc 20995589Salcstatic __inline vm_offset_t 210238502Smdfvm_map_min(const struct vm_map *map) 21195589Salc{ 21295589Salc return (map->min_offset); 21395589Salc} 21495589Salc 21595589Salcstatic __inline pmap_t 21695589Salcvm_map_pmap(vm_map_t map) 21795589Salc{ 21895589Salc return (map->pmap); 21995589Salc} 220118771Sbms 221118771Sbmsstatic __inline void 222118771Sbmsvm_map_modflags(vm_map_t map, vm_flags_t set, vm_flags_t clear) 223118771Sbms{ 224118771Sbms map->flags = (map->flags | set) & ~clear; 225118771Sbms} 22695589Salc#endif /* _KERNEL */ 22795589Salc 228121962Sdes/* 22912662Sdg * Shareable process virtual address space. 23098818Salc * 23198818Salc * List of locks 23298818Salc * (c) const until freed 23312662Sdg */ 23412662Sdgstruct vmspace { 23512662Sdg struct vm_map vm_map; /* VM address map */ 236100512Salfred struct shmmap_state *vm_shm; /* SYS5 shared memory private data XXX */ 23712662Sdg segsz_t vm_swrss; /* resident set size before last swap */ 23812662Sdg segsz_t vm_tsize; /* text size (pages) XXX */ 23912662Sdg segsz_t vm_dsize; /* data size (pages) XXX */ 24012662Sdg segsz_t vm_ssize; /* stack size (pages) */ 24198818Salc caddr_t vm_taddr; /* (c) user virtual address of text */ 24298818Salc caddr_t vm_daddr; /* (c) user virtual address of data */ 24312662Sdg caddr_t vm_maxsaddr; /* user VA at max stack growth */ 244214144Sjhb volatile int vm_refcnt; /* number of references */ 245176717Smarcel /* 246176717Smarcel * Keep the PMAP last, so that CPU-specific variations of that 247176717Smarcel * structure on a single architecture don't result in offset 248176717Smarcel * variations of the machine-independent fields in the vmspace. 249176717Smarcel */ 250176717Smarcel struct pmap vm_pmap; /* private physical map */ 25112662Sdg}; 25212662Sdg 25376827Salfred#ifdef _KERNEL 25497727Salcstatic __inline pmap_t 25597727Salcvmspace_pmap(struct vmspace *vmspace) 25697727Salc{ 25797727Salc return &vmspace->vm_pmap; 25897727Salc} 25997727Salc#endif /* _KERNEL */ 26097727Salc 26197727Salc#ifdef _KERNEL 2621541Srgrimes/* 2631541Srgrimes * Macros: vm_map_lock, etc. 2641541Srgrimes * Function: 26549900Salc * Perform locking on the data portion of a map. Note that 26649900Salc * these macros mimic procedure calls returning void. The 26749900Salc * semicolon is supplied by the user of these macros, not 26849900Salc * by the macros themselves. The macros can safely be used 26949900Salc * as unbraced elements in a higher level statement. 2701541Srgrimes */ 2711541Srgrimes 27295686Salcvoid _vm_map_lock(vm_map_t map, const char *file, int line); 27395686Salcvoid _vm_map_unlock(vm_map_t map, const char *file, int line); 274212868Salcint _vm_map_unlock_and_wait(vm_map_t map, int timo, const char *file, int line); 27595686Salcvoid _vm_map_lock_read(vm_map_t map, const char *file, int line); 27695686Salcvoid _vm_map_unlock_read(vm_map_t map, const char *file, int line); 27795686Salcint _vm_map_trylock(vm_map_t map, const char *file, int line); 278112167Sdasint _vm_map_trylock_read(vm_map_t map, const char *file, int line); 27995686Salcint _vm_map_lock_upgrade(vm_map_t map, const char *file, int line); 28095686Salcvoid _vm_map_lock_downgrade(vm_map_t map, const char *file, int line); 281186665Salcint vm_map_locked(vm_map_t map); 28299754Salcvoid vm_map_wakeup(vm_map_t map); 283216335Smlaiervoid vm_map_busy(vm_map_t map); 284216335Smlaiervoid vm_map_unbusy(vm_map_t map); 285216335Smlaiervoid vm_map_wait_busy(vm_map_t map); 28628345Sdyson 28795686Salc#define vm_map_lock(map) _vm_map_lock(map, LOCK_FILE, LOCK_LINE) 28895686Salc#define vm_map_unlock(map) _vm_map_unlock(map, LOCK_FILE, LOCK_LINE) 289212868Salc#define vm_map_unlock_and_wait(map, timo) \ 290212868Salc _vm_map_unlock_and_wait(map, timo, LOCK_FILE, LOCK_LINE) 29195686Salc#define vm_map_lock_read(map) _vm_map_lock_read(map, LOCK_FILE, LOCK_LINE) 29295686Salc#define vm_map_unlock_read(map) _vm_map_unlock_read(map, LOCK_FILE, LOCK_LINE) 29395686Salc#define vm_map_trylock(map) _vm_map_trylock(map, LOCK_FILE, LOCK_LINE) 294112167Sdas#define vm_map_trylock_read(map) \ 295112167Sdas _vm_map_trylock_read(map, LOCK_FILE, LOCK_LINE) 29695686Salc#define vm_map_lock_upgrade(map) \ 29795686Salc _vm_map_lock_upgrade(map, LOCK_FILE, LOCK_LINE) 29895686Salc#define vm_map_lock_downgrade(map) \ 29995686Salc _vm_map_lock_downgrade(map, LOCK_FILE, LOCK_LINE) 30095686Salc 30179248Sdillonlong vmspace_resident_count(struct vmspace *vmspace); 30276827Salfred#endif /* _KERNEL */ 3031541Srgrimes 30444146Sluoqi 3051541Srgrimes/* XXX: number of kernel maps and entries to statically allocate */ 3061541Srgrimes#define MAX_KMAP 10 3071549Srgrimes#define MAX_KMAPENT 128 3081541Srgrimes 30913490Sdyson/* 31013490Sdyson * Copy-on-write flags for vm_map operations 31113490Sdyson */ 312231526Skib#define MAP_INHERIT_SHARE 0x0001 31357550Sps#define MAP_COPY_ON_WRITE 0x0002 31457550Sps#define MAP_NOFAULT 0x0004 31557550Sps#define MAP_PREFAULT 0x0008 31657550Sps#define MAP_PREFAULT_PARTIAL 0x0010 31757550Sps#define MAP_DISABLE_SYNCER 0x0020 318267901Skib#define MAP_CHECK_EXCL 0x0040 31957550Sps#define MAP_DISABLE_COREDUMP 0x0100 32085762Sdillon#define MAP_PREFAULT_MADVISE 0x0200 /* from (user) madvise request */ 321232071Skib#define MAP_VN_WRITECOUNT 0x0400 322120531Smarcel#define MAP_STACK_GROWS_DOWN 0x1000 323120531Smarcel#define MAP_STACK_GROWS_UP 0x2000 324194766Skib#define MAP_ACC_CHARGED 0x4000 325194766Skib#define MAP_ACC_NO_CHARGE 0x8000 32613490Sdyson 32720449Sdyson/* 32820449Sdyson * vm_fault option flags 32920449Sdyson */ 33024666Sdyson#define VM_FAULT_NORMAL 0 /* Nothing special */ 33124666Sdyson#define VM_FAULT_CHANGE_WIRING 1 /* Change the wiring as appropriate */ 332216604Salc#define VM_FAULT_DIRTY 2 /* Dirty the page; use w/VM_PROT_COPY */ 33320449Sdyson 334118771Sbms/* 335235230Salc * Initially, mappings are slightly sequential. The maximum window size must 336235230Salc * account for the map entry's "read_ahead" field being defined as an uint8_t. 337235230Salc */ 338235230Salc#define VM_FAULT_READ_AHEAD_MIN 7 339235230Salc#define VM_FAULT_READ_AHEAD_INIT 15 340235230Salc#define VM_FAULT_READ_AHEAD_MAX min(atop(MAXPHYS) - 1, UINT8_MAX) 341235230Salc 342235230Salc/* 343254430Sjhb * The following "find_space" options are supported by vm_map_find(). 344254430Sjhb * 345254430Sjhb * For VMFS_ALIGNED_SPACE, the desired alignment is specified to 346254430Sjhb * the macro argument as log base 2 of the desired alignment. 347178928Salc */ 348178928Salc#define VMFS_NO_SPACE 0 /* don't find; use the given range */ 349178928Salc#define VMFS_ANY_SPACE 1 /* find a range with any alignment */ 350253471Sjhb#define VMFS_OPTIMAL_SPACE 2 /* find a range with optimal alignment*/ 351254430Sjhb#define VMFS_SUPER_SPACE 3 /* find a superpage-aligned range */ 352254430Sjhb#define VMFS_ALIGNED_SPACE(x) ((x) << 8) /* find a range with fixed alignment */ 353178928Salc 354178928Salc/* 355118771Sbms * vm_map_wire and vm_map_unwire option flags 356118771Sbms */ 357118771Sbms#define VM_MAP_WIRE_SYSTEM 0 /* wiring in a kernel map */ 358118771Sbms#define VM_MAP_WIRE_USER 1 /* wiring in a user map */ 359118771Sbms 360118771Sbms#define VM_MAP_WIRE_NOHOLES 0 /* region must not have holes */ 361118771Sbms#define VM_MAP_WIRE_HOLESOK 2 /* region may have holes */ 362118771Sbms 363219819Sjeff#define VM_MAP_WIRE_WRITE 4 /* Validate writable. */ 364219819Sjeff 36555206Speter#ifdef _KERNEL 36679248Sdillonboolean_t vm_map_check_protection (vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t); 367116387Salcvm_map_t vm_map_create(pmap_t, vm_offset_t, vm_offset_t); 368189015Skibint vm_map_delete(vm_map_t, vm_offset_t, vm_offset_t); 369178928Salcint vm_map_find(vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t *, vm_size_t, 370255426Sjhb vm_offset_t, int, vm_prot_t, vm_prot_t, int); 371178630Salcint vm_map_fixed(vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t, vm_size_t, 372178630Salc vm_prot_t, vm_prot_t, int); 37379248Sdillonint vm_map_findspace (vm_map_t, vm_offset_t, vm_size_t, vm_offset_t *); 37479248Sdillonint vm_map_inherit (vm_map_t, vm_offset_t, vm_offset_t, vm_inherit_t); 375206142Salcvoid vm_map_init(vm_map_t, pmap_t, vm_offset_t, vm_offset_t); 37679248Sdillonint vm_map_insert (vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t, vm_offset_t, vm_prot_t, vm_prot_t, int); 37779248Sdillonint vm_map_lookup (vm_map_t *, vm_offset_t, vm_prot_t, vm_map_entry_t *, vm_object_t *, 37879248Sdillon vm_pindex_t *, vm_prot_t *, boolean_t *); 379133598Steggeint vm_map_lookup_locked(vm_map_t *, vm_offset_t, vm_prot_t, vm_map_entry_t *, vm_object_t *, 380133598Stegge vm_pindex_t *, vm_prot_t *, boolean_t *); 38179248Sdillonvoid vm_map_lookup_done (vm_map_t, vm_map_entry_t); 38279248Sdillonboolean_t vm_map_lookup_entry (vm_map_t, vm_offset_t, vm_map_entry_t *); 383128596Salcvoid vm_map_pmap_enter(vm_map_t map, vm_offset_t addr, vm_prot_t prot, 384117047Salc vm_object_t object, vm_pindex_t pindex, vm_size_t size, int flags); 38579248Sdillonint vm_map_protect (vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t, boolean_t); 38679248Sdillonint vm_map_remove (vm_map_t, vm_offset_t, vm_offset_t); 38779248Sdillonvoid vm_map_startup (void); 38879248Sdillonint vm_map_submap (vm_map_t, vm_offset_t, vm_offset_t, vm_map_t); 389122349Salcint vm_map_sync(vm_map_t, vm_offset_t, vm_offset_t, boolean_t, boolean_t); 39079248Sdillonint vm_map_madvise (vm_map_t, vm_offset_t, vm_offset_t, int); 39179248Sdillonvoid vm_map_simplify_entry (vm_map_t, vm_map_entry_t); 39279248Sdillonint vm_map_stack (vm_map_t, vm_offset_t, vm_size_t, vm_prot_t, vm_prot_t, int); 39379248Sdillonint vm_map_growstack (struct proc *p, vm_offset_t addr); 39498022Salcint vm_map_unwire(vm_map_t map, vm_offset_t start, vm_offset_t end, 395118771Sbms int flags); 39698036Salcint vm_map_wire(vm_map_t map, vm_offset_t start, vm_offset_t end, 397118771Sbms int flags); 398219124Sbruceclong vmspace_swap_count(struct vmspace *vmspace); 39992029Seivind#endif /* _KERNEL */ 4005455Sdg#endif /* _VM_MAP_ */ 401