From df97827e5ed312bbf008ad00c03a43ccf4bf2e18 Mon Sep 17 00:00:00 2001 From: gallatin Date: Sun, 16 Feb 2003 17:30:49 +0000 Subject: When trimming memory to fit Maxmem, and we discard an entire cluster, make certain to subtract its pages from physmem. Otherwise we end up running phys_avail_cnt negative, and bad stuff happens. MFC After: 1 week --- sys/alpha/alpha/machdep.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sys') diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c index ddf67d7..2ce041b 100644 --- a/sys/alpha/alpha/machdep.c +++ b/sys/alpha/alpha/machdep.c @@ -827,6 +827,7 @@ alpha_init(pfn, ptb, bim, bip, biv) if (physmem - sz > Maxmem) { phys_avail[i] = 0; phys_avail_cnt -= 2; + physmem -= sz; } else { nsz = sz - (physmem - Maxmem); phys_avail[i+1] = phys_avail[i] + alpha_ptob(nsz); -- cgit v1.1