Subject: Re: kern/1891: statically-sized message buffer wastes space on many ports
To: Gordon Ross <>
From: None <Chris_G_Demetriou@NIAGARA.NECTAR.CS.CMU.EDU>
List: netbsd-bugs
Date: 01/05/1996 11:26:38
> I have one request related to this topic.  I would like to be able to
> control the actual size of the message buffer using a macro definition
> in the port-specific param.h file.  It was not clear to me whether the
> changes proposed in this PR allow the size to be defined by each port.
> (I suspect that was true, but want to make sure.)

the new (machine-independent) message buf init interface is:

void    initmsgbuf __P((caddr_t buf, size_t bufsize));

you pass it a pointer and the buffer size.  The only requirements on
either are that:
	(1) the buffer size must be > sizeof (struct msgbuf).  8-)
	(2) the buffer will be to (struct msgbuf *), so the
	    alignment will be right.

I didn't know that there was an actual case where somebody would want
a weird-sized message buffer, but i figured there might be and it
didn't cost anything to design that support in...  8-)

syslogd doesn't much care about the message buffer size (except that
it wants an internal buffer big enough to read the whole thing in one
go), and my mods to dmesg have no limitations that would prevent dmesg
from working with a strangely-sized message buffer.