Deleted Added
sdiff udiff text old ( 92029 ) new ( 92654 )
full compact
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

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

29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * from: @(#)vm_page.c 7.4 (Berkeley) 5/7/91
37 * $FreeBSD: head/sys/vm/vm_page.c 92029 2002-03-10 21:52:48Z eivind $
38 */
39
40/*
41 * Copyright (c) 1987, 1990 Carnegie-Mellon University.
42 * All rights reserved.
43 *
44 * Authors: Avadis Tevanian, Jr., Michael Wayne Young
45 *

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

113#include <vm/vm.h>
114#include <vm/vm_param.h>
115#include <vm/vm_kern.h>
116#include <vm/vm_object.h>
117#include <vm/vm_page.h>
118#include <vm/vm_pageout.h>
119#include <vm/vm_pager.h>
120#include <vm/vm_extern.h>
121
122/*
123 * Associated with page of user-allocatable memory is a
124 * page structure.
125 */
126static struct vm_page **vm_page_buckets; /* Array of buckets */
127static int vm_page_bucket_count; /* How big is array? */
128static int vm_page_hash_mask; /* Mask for hash function */

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

171 int nblocks;
172 vm_offset_t last_pa;
173
174 /* the biggest memory array is the second group of pages */
175 vm_offset_t end;
176 vm_offset_t biggestone, biggestsize;
177
178 vm_offset_t total;
179
180 total = 0;
181 biggestsize = 0;
182 biggestone = 0;
183 nblocks = 0;
184 vaddr = round_page(vaddr);
185
186 for (i = 0; phys_avail[i + 1]; i += 2) {

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

203
204 /*
205 * Initialize the queue headers for the free queue, the active queue
206 * and the inactive queue.
207 */
208 vm_pageq_init();
209
210 /*
211 * Allocate (and initialize) the hash table buckets.
212 *
213 * The number of buckets MUST BE a power of 2, and the actual value is
214 * the next power of 2 greater than the number of physical pages in
215 * the system.
216 *
217 * We make the hash table approximately 2x the number of pages to
218 * reduce the chain length. This is about the same size using the

--- 1559 unchanged lines hidden ---