diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c index d9a5104d593b..e31b2cd8808b 100644 --- a/sys/alpha/alpha/machdep.c +++ b/sys/alpha/alpha/machdep.c @@ -879,8 +879,10 @@ alpha_init(pfn, ptb, bim, bip, biv) msgbufinit(msgbufp, sz); /* Remove the last segment if it now has no pages. */ - if (phys_avail[i] == phys_avail[i+1]) + if (phys_avail[i] == phys_avail[i+1]) { phys_avail[i] = 0; + phys_avail[i+1] = 0; + } /* warn if the message buffer had to be shrunk */ if (sz != round_page(MSGBUF_SIZE)) diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c index c0f9409ec54e..2faa954e4320 100644 --- a/sys/ia64/ia64/machdep.c +++ b/sys/ia64/ia64/machdep.c @@ -748,8 +748,10 @@ ia64_init(u_int64_t arg1, u_int64_t arg2) msgbufinit(msgbufp, sz); /* Remove the last segment if it now has no pages. */ - if (phys_avail[i] == phys_avail[i+1]) + if (phys_avail[i] == phys_avail[i+1]) { phys_avail[i] = 0; + phys_avail[i+] = 0; + } /* warn if the message buffer had to be shrunk */ if (sz != round_page(MSGBUF_SIZE))