Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm Shift by PAGE_SHIFT instead of dividing by PAGE_SIZE.
details: https://anonhg.NetBSD.org/src/rev/4487c0e00d30
branches: trunk
changeset: 533062:4487c0e00d30
user: enami <enami%NetBSD.org@localhost>
date: Thu Jun 20 08:24:22 2002 +0000
description:
Shift by PAGE_SHIFT instead of dividing by PAGE_SIZE.
diffstat:
sys/uvm/uvm_pglist.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diffs (50 lines):
diff -r b69657f0a6f6 -r 4487c0e00d30 sys/uvm/uvm_pglist.c
--- a/sys/uvm/uvm_pglist.c Thu Jun 20 08:21:59 2002 +0000
+++ b/sys/uvm/uvm_pglist.c Thu Jun 20 08:24:22 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_pglist.c,v 1.22 2002/06/18 15:49:48 drochner Exp $ */
+/* $NetBSD: uvm_pglist.c,v 1.23 2002/06/20 08:24:22 enami Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_pglist.c,v 1.22 2002/06/18 15:49:48 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_pglist.c,v 1.23 2002/06/20 08:24:22 enami Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -178,7 +178,7 @@
panic("pgalloc contig: botch4");
#endif
tryidx = try - vm_physmem[psi].start;
- end = tryidx + (size / PAGE_SIZE);
+ end = tryidx + (size >> PAGE_SHIFT);
pgs = vm_physmem[psi].pgs;
/*
@@ -330,7 +330,7 @@
/* Default to "lose". */
error = ENOMEM;
- todo = size / PAGE_SIZE;
+ todo = size >> PAGE_SHIFT;
again:
/*
@@ -413,10 +413,10 @@
TAILQ_INIT(rlist);
- if ((nsegs < size / PAGE_SIZE) || (alignment != PAGE_SIZE)
- || (boundary != 0))
+ if ((nsegs < size >> PAGE_SHIFT) || (alignment != PAGE_SIZE) ||
+ (boundary != 0))
res = uvm_pglistalloc_contig(size, low, high, alignment,
- boundary, rlist);
+ boundary, rlist);
else
res = uvm_pglistalloc_simple(size, low, high, rlist, waitok);
Home |
Main Index |
Thread Index |
Old Index