Deleted Added
full compact
vm_page.c (132852) vm_page.c (135262)
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 132852 2004-07-29 18:56:31Z alc $");
100__FBSDID("$FreeBSD: head/sys/vm/vm_page.c 135262 2004-09-15 12:09:50Z phk $");
101
102#include <sys/param.h>
103#include <sys/systm.h>
104#include <sys/lock.h>
105#include <sys/malloc.h>
106#include <sys/mutex.h>
107#include <sys/proc.h>
108#include <sys/vmmeter.h>

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

258 */
259 bzero((caddr_t) vm_page_array, page_range * sizeof(struct vm_page));
260 vm_page_array_size = page_range;
261
262 /*
263 * Construct the free queue(s) in descending order (by physical
264 * address) so that the first 16MB of physical memory is allocated
265 * last rather than first. On large-memory machines, this avoids
101
102#include <sys/param.h>
103#include <sys/systm.h>
104#include <sys/lock.h>
105#include <sys/malloc.h>
106#include <sys/mutex.h>
107#include <sys/proc.h>
108#include <sys/vmmeter.h>

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

258 */
259 bzero((caddr_t) vm_page_array, page_range * sizeof(struct vm_page));
260 vm_page_array_size = page_range;
261
262 /*
263 * Construct the free queue(s) in descending order (by physical
264 * address) so that the first 16MB of physical memory is allocated
265 * last rather than first. On large-memory machines, this avoids
266 * the exhaustion of low physical memory before isa_dmainit has run.
266 * the exhaustion of low physical memory before isa_dma_init has run.
267 */
268 cnt.v_page_count = 0;
269 cnt.v_free_count = 0;
270 for (i = 0; phys_avail[i + 1] && npages > 0; i += 2) {
271 pa = phys_avail[i];
272 last_pa = phys_avail[i + 1];
273 while (pa < last_pa && npages-- > 0) {
274 vm_pageq_add_new_page(pa);

--- 1480 unchanged lines hidden ---
267 */
268 cnt.v_page_count = 0;
269 cnt.v_free_count = 0;
270 for (i = 0; phys_avail[i + 1] && npages > 0; i += 2) {
271 pa = phys_avail[i];
272 last_pa = phys_avail[i + 1];
273 while (pa < last_pa && npages-- > 0) {
274 vm_pageq_add_new_page(pa);

--- 1480 unchanged lines hidden ---