1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

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
This commit is contained in:
Andrew Gallatin 2003-02-16 17:30:49 +00:00
parent e0554a531f
commit cb259970c3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=111011

View File

@ -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);