vm_page.c (148985) | vm_page.c (151104) |
---|---|
1/*- 2 * Copyright (c) 1991 Regents of the University of California. 3 * 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 --- 83 unchanged lines hidden (view full) --- 92 * and free queues are actually arrays already. 93 */ 94 95/* 96 * Resident memory management module. 97 */ 98 99#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1991 Regents of the University of California. 3 * 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 --- 83 unchanged lines hidden (view full) --- 92 * and free queues are actually arrays already. 93 */ 94 95/* 96 * Resident memory management module. 97 */ 98 99#include <sys/cdefs.h> |
100__FBSDID("$FreeBSD: head/sys/vm/vm_page.c 148985 2005-08-12 12:24:19Z des $"); | 100__FBSDID("$FreeBSD: head/sys/vm/vm_page.c 151104 2005-10-08 21:03:54Z des $"); |
101 102#include <sys/param.h> 103#include <sys/systm.h> 104#include <sys/lock.h> 105#include <sys/kernel.h> 106#include <sys/malloc.h> 107#include <sys/mutex.h> 108#include <sys/proc.h> --- 115 unchanged lines hidden (view full) --- 224 /* 225 * Allocate memory for use when boot strapping the kernel memory 226 * allocator. 227 */ 228 new_end = end - (boot_pages * UMA_SLAB_SIZE); 229 new_end = trunc_page(new_end); 230 mapped = pmap_map(&vaddr, new_end, end, 231 VM_PROT_READ | VM_PROT_WRITE); | 101 102#include <sys/param.h> 103#include <sys/systm.h> 104#include <sys/lock.h> 105#include <sys/kernel.h> 106#include <sys/malloc.h> 107#include <sys/mutex.h> 108#include <sys/proc.h> --- 115 unchanged lines hidden (view full) --- 224 /* 225 * Allocate memory for use when boot strapping the kernel memory 226 * allocator. 227 */ 228 new_end = end - (boot_pages * UMA_SLAB_SIZE); 229 new_end = trunc_page(new_end); 230 mapped = pmap_map(&vaddr, new_end, end, 231 VM_PROT_READ | VM_PROT_WRITE); |
232 bzero((caddr_t) mapped, end - new_end); 233 uma_startup((caddr_t)mapped); | 232 bzero((void *)mapped, end - new_end); 233 uma_startup((void *)mapped, boot_pages); |
234 235 /* 236 * Compute the number of pages of memory that will be available for 237 * use (taking into account the overhead of a page structure per 238 * page). 239 */ 240 first_page = phys_avail[0] / PAGE_SIZE; 241 page_range = phys_avail[(nblocks - 1) * 2 + 1] / PAGE_SIZE - first_page; --- 1506 unchanged lines hidden --- | 234 235 /* 236 * Compute the number of pages of memory that will be available for 237 * use (taking into account the overhead of a page structure per 238 * page). 239 */ 240 first_page = phys_avail[0] / PAGE_SIZE; 241 page_range = phys_avail[(nblocks - 1) * 2 + 1] / PAGE_SIZE - first_page; --- 1506 unchanged lines hidden --- |