On Sun, Jul 03, 2011 at 02:07:59PM +0200, Robert Millan wrote:
> 2011/7/3 Kostik Belousov <kostik...@gmail.com>:
> > I think the different workaround is already included in the latest
> > sbuf source. Please see
> > http://svnweb.freebsd.org/base/head/sys/kern/subr_sbuf.c?revision=222015&view=markup
> 
> How does libsbuf react if the guess fails?  Also note this codepath
> isn't tested in FreeBSD (except for pc98).
> 
> I'm afraid this situation could lead to runtime errors somehow.  I'd
> still propose replacing this guess with a sysconf() check.

Which runtime errors ? The constant is used to size the malloc
allocations. Use of the PAGE_SIZE is an attempt to do some optimization.

I think it would work if you use e.g. 42 instead of PAGE_SIZE.

Attachment: pgpaKJ1P9cEbq.pgp
Description: PGP signature

Reply via email to