Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Jul 2011 15:34:35 +0300
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Robert Millan <rmh@debian.org>
Cc:        freebsd-hackers@freebsd.org, Ed Maste <emaste@freebsd.org>
Subject:   Re: [PATCH] PAGE_SIZE in libsbuf
Message-ID:  <20110703123435.GN48734@deviant.kiev.zoral.com.ua>
In-Reply-To: <CAOfDtXNQD1yVv0NFxeSRiS07BoQA3L-7vwJ0kLJwnOfABWP4Gg@mail.gmail.com>
References:  <CAOfDtXMVWT0jGw_o5ugBNW7Fiq1O2avDnprXAZ3s8aP-hsMTLA@mail.gmail.com> <20110703115750.GL48734@deviant.kiev.zoral.com.ua> <CAOfDtXNQD1yVv0NFxeSRiS07BoQA3L-7vwJ0kLJwnOfABWP4Gg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--ppqw4mhdCbV3XNpT
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Jul 03, 2011 at 02:07:59PM +0200, Robert Millan wrote:
> 2011/7/3 Kostik Belousov <kostikbel@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=3D222=
015&view=3Dmarkup
>=20
> How does libsbuf react if the guess fails?  Also note this codepath
> isn't tested in FreeBSD (except for pc98).
>=20
> 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.

--ppqw4mhdCbV3XNpT
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (FreeBSD)

iEYEARECAAYFAk4QYdoACgkQC3+MBN1Mb4j9PwCfQRbDXJe5qB/t2HHTrA8hg76X
3msAnRDZqkBybktcBXVhSGq97qUpUFEw
=QHJl
-----END PGP SIGNATURE-----

--ppqw4mhdCbV3XNpT--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110703123435.GN48734>