1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * The Mach Operating System project at Carnegie-Mellon University. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 49 unchanged lines hidden (view full) --- 58 * rights to redistribute these changes. 59 */ 60 61/* 62 * Virtual memory mapping module. 63 */ 64 65#include <sys/cdefs.h> |
66__FBSDID("$FreeBSD: head/sys/vm/vm_map.c 247360 2013-02-26 23:35:27Z attilio $"); |
67 68#include <sys/param.h> 69#include <sys/systm.h> 70#include <sys/kernel.h> 71#include <sys/ktr.h> 72#include <sys/lock.h> 73#include <sys/mutex.h> 74#include <sys/proc.h> --- 45 unchanged lines hidden (view full) --- 120 * another, and then marking both regions as copy-on-write. 121 */ 122 123static struct mtx map_sleep_mtx; 124static uma_zone_t mapentzone; 125static uma_zone_t kmapentzone; 126static uma_zone_t mapzone; 127static uma_zone_t vmspace_zone; |
128static int vmspace_zinit(void *mem, int size, int flags); 129static void vmspace_zfini(void *mem, int size); 130static int vm_map_zinit(void *mem, int ize, int flags); 131static void vm_map_zfini(void *mem, int size); 132static void _vm_map_init(vm_map_t map, pmap_t pmap, vm_offset_t min, 133 vm_offset_t max); 134static void vm_map_entry_deallocate(vm_map_entry_t entry, boolean_t system_map); 135static void vm_map_entry_dispose(vm_map_t map, vm_map_entry_t entry); --- 161 unchanged lines hidden (view full) --- 297 vm->vm_daddr = 0; 298 vm->vm_maxsaddr = 0; 299 return (vm); 300} 301 302void 303vm_init2(void) 304{ |
305 uma_zone_reserve_kva(kmapentzone, lmin(cnt.v_page_count, |
306 (VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) / PAGE_SIZE) / 8 + 307 maxproc * 2 + maxfiles); 308 vmspace_zone = uma_zcreate("VMSPACE", sizeof(struct vmspace), NULL, 309#ifdef INVARIANTS 310 vmspace_zdtor, 311#else 312 NULL, 313#endif --- 3781 unchanged lines hidden --- |