vm_kern.c (254430) | vm_kern.c (255426) |
---|---|
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 * Kernel memory management. 63 */ 64 65#include <sys/cdefs.h> | 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 * Kernel memory management. 63 */ 64 65#include <sys/cdefs.h> |
66__FBSDID("$FreeBSD: head/sys/vm/vm_kern.c 254430 2013-08-16 21:13:55Z jhb $"); | 66__FBSDID("$FreeBSD: head/sys/vm/vm_kern.c 255426 2013-09-09 18:11:59Z jhb $"); |
67 68#include <sys/param.h> 69#include <sys/systm.h> 70#include <sys/kernel.h> /* for ticks and hz */ 71#include <sys/eventhandler.h> 72#include <sys/lock.h> 73#include <sys/proc.h> 74#include <sys/malloc.h> --- 205 unchanged lines hidden (view full) --- 280 vm_size_t size, boolean_t superpage_align) 281{ 282 int ret; 283 vm_map_t result; 284 285 size = round_page(size); 286 287 *min = vm_map_min(parent); | 67 68#include <sys/param.h> 69#include <sys/systm.h> 70#include <sys/kernel.h> /* for ticks and hz */ 71#include <sys/eventhandler.h> 72#include <sys/lock.h> 73#include <sys/proc.h> 74#include <sys/malloc.h> --- 205 unchanged lines hidden (view full) --- 280 vm_size_t size, boolean_t superpage_align) 281{ 282 int ret; 283 vm_map_t result; 284 285 size = round_page(size); 286 287 *min = vm_map_min(parent); |
288 ret = vm_map_find(parent, NULL, 0, min, size, superpage_align ? | 288 ret = vm_map_find(parent, NULL, 0, min, size, 0, superpage_align ? |
289 VMFS_SUPER_SPACE : VMFS_ANY_SPACE, VM_PROT_ALL, VM_PROT_ALL, 290 MAP_ACC_NO_CHARGE); 291 if (ret != KERN_SUCCESS) 292 panic("kmem_suballoc: bad status return of %d", ret); 293 *max = *min + size; 294 result = vm_map_create(vm_map_pmap(parent), *min, *max); 295 if (result == NULL) 296 panic("kmem_suballoc: cannot create submap"); --- 268 unchanged lines hidden --- | 289 VMFS_SUPER_SPACE : VMFS_ANY_SPACE, VM_PROT_ALL, VM_PROT_ALL, 290 MAP_ACC_NO_CHARGE); 291 if (ret != KERN_SUCCESS) 292 panic("kmem_suballoc: bad status return of %d", ret); 293 *max = *min + size; 294 result = vm_map_create(vm_map_pmap(parent), *min, *max); 295 if (result == NULL) 296 panic("kmem_suballoc: cannot create submap"); --- 268 unchanged lines hidden --- |