Deleted Added
sdiff udiff text old ( 245421 ) new ( 247360 )
full compact
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 245421 2013-01-14 12:12:56Z zont $");
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 struct vm_object kmapentobj;
129static int vmspace_zinit(void *mem, int size, int flags);
130static void vmspace_zfini(void *mem, int size);
131static int vm_map_zinit(void *mem, int ize, int flags);
132static void vm_map_zfini(void *mem, int size);
133static void _vm_map_init(vm_map_t map, pmap_t pmap, vm_offset_t min,
134 vm_offset_t max);
135static void vm_map_entry_deallocate(vm_map_entry_t entry, boolean_t system_map);
136static void vm_map_entry_dispose(vm_map_t map, vm_map_entry_t entry);

--- 161 unchanged lines hidden (view full) ---

298 vm->vm_daddr = 0;
299 vm->vm_maxsaddr = 0;
300 return (vm);
301}
302
303void
304vm_init2(void)
305{
306 uma_zone_set_obj(kmapentzone, &kmapentobj, lmin(cnt.v_page_count,
307 (VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) / PAGE_SIZE) / 8 +
308 maxproc * 2 + maxfiles);
309 vmspace_zone = uma_zcreate("VMSPACE", sizeof(struct vmspace), NULL,
310#ifdef INVARIANTS
311 vmspace_zdtor,
312#else
313 NULL,
314#endif

--- 3781 unchanged lines hidden ---