Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/sysinst PR 56303: do not borrow from the default sw...
details: https://anonhg.NetBSD.org/src/rev/188b88c57410
branches: trunk
changeset: 984734:188b88c57410
user: martin <martin%NetBSD.org@localhost>
date: Tue Jul 20 16:41:27 2021 +0000
description:
PR 56303: do not borrow from the default swap allocation if we are in
tiny ram conditions and will need to enable swap early.
diffstat:
usr.sbin/sysinst/bsddisklabel.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (19 lines):
diff -r 24916cc1c797 -r 188b88c57410 usr.sbin/sysinst/bsddisklabel.c
--- a/usr.sbin/sysinst/bsddisklabel.c Tue Jul 20 16:40:12 2021 +0000
+++ b/usr.sbin/sysinst/bsddisklabel.c Tue Jul 20 16:41:27 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bsddisklabel.c,v 1.58 2021/02/13 15:31:35 martin Exp $ */
+/* $NetBSD: bsddisklabel.c,v 1.59 2021/07/20 16:41:27 martin Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -1153,7 +1153,8 @@
continue;
free_space -= wanted->infos[i].size;
}
- if (free_space < 0 && swap < wanted->num) {
+ if (free_space < 0 && swap < wanted->num &&
+ get_ramsize() > TINY_RAM_SIZE) {
/* steel from swap partition */
daddr_t d = wanted->infos[swap].size;
daddr_t inc = roundup(-free_space, align);
Home |
Main Index |
Thread Index |
Old Index