summaryrefslogtreecommitdiffstats
path: root/sys/vm/swap_pager.c
diff options
context:
space:
mode:
authordyson <dyson@FreeBSD.org>1995-05-07 06:36:59 +0000
committerdyson <dyson@FreeBSD.org>1995-05-07 06:36:59 +0000
commit02299bb821b724adf76f4979979254fdd373117b (patch)
tree20782ad43e82ff441ca5c20124405d6d8e9de807 /sys/vm/swap_pager.c
parent562a666ce0ac9a6d3ffad1a6040cf8c9424628df (diff)
downloadFreeBSD-src-02299bb821b724adf76f4979979254fdd373117b.zip
FreeBSD-src-02299bb821b724adf76f4979979254fdd373117b.tar.gz
Another error in the correction for trimming swap allocation for
small objects. (This code needs to be revisited.)
Diffstat (limited to 'sys/vm/swap_pager.c')
-rw-r--r--sys/vm/swap_pager.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c
index 0a6d839..4305625 100644
--- a/sys/vm/swap_pager.c
+++ b/sys/vm/swap_pager.c
@@ -39,7 +39,7 @@
* from: Utah $Hdr: swap_pager.c 1.4 91/04/30$
*
* @(#)swap_pager.c 8.9 (Berkeley) 3/21/94
- * $Id: swap_pager.c,v 1.35 1995/04/19 10:32:11 davidg Exp $
+ * $Id: swap_pager.c,v 1.36 1995/05/07 03:48:54 dyson Exp $
*/
/*
@@ -1269,9 +1269,9 @@ swap_pager_output(swp, m, count, flags, rtvals)
* intent of this code is to allocate small chunks for
* small objects)
*/
- if ((i != 1) &&
- (foff + ntoget * PAGE_SIZE) > object->size) {
- ntoget = ((object->size + (PAGE_SIZE - 1)) - foff) / PAGE_SIZE;
+ if ((foff == 0) &&
+ ((ntoget * PAGE_SIZE) > object->size)) {
+ ntoget = (object->size + (PAGE_SIZE - 1)) / PAGE_SIZE;
}
retrygetspace:
if (!swap_pager_full && ntoget > 1 &&
OpenPOWER on IntegriCloud