On Sat, 1 Mar 2008, Roman Divacky wrote:
> I think you can use "ptoa(Maxmem) - round_page(MSGBUF_SIZE)",
> the ptoa(Maxmem)
> erm.. what I meant to say what
> that hw.realmem - round_page(MSGBUF_SIZE) should work


Hi:

Before I saw your message, I continued my search and found an January 2007
mailing list message by Kip Macy on how to compute avail_end:
http://groups.google.com/group/maili...39973c1586a8a7

static vm_paddr_t
get_avail_end(void)
{
vm_paddr_t avail_end;
int i;
avail_end = phys_avail[1];
for (i = 0; phys_avail[i + 1]; i += 2) {
if (phys_avail[i + 1] > avail_end)
avail_end = phys_avail[i + 1];
}
return avail_end;
}

Are the two methods equivalent?

Also, how do I use hw.realmem like you suggested?
I tried the following, but the file wouldn't compile:

static vm_paddr_t avail_end = hw.realmem - round_page(MSGBUF_SIZE);

Thank you!


_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/lis...reebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"