Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Nov 2005 13:30:19 +0100
From:      Ulrich Spoerlein <q@galgenberg.net>
To:        "Daniel O'Connor" <doconnor@gsoft.com.au>
Cc:        Poul-Henning Kamp <phk@phk.freebsd.dk>, freebsd-current@freebsd.org, Jason Evans <jasone@canonware.com>, current@freebsd.org
Subject:   Re: New libc malloc patch
Message-ID:  <20051130123019.GA1068@galgenberg.net>
In-Reply-To: <200511302252.05741.doconnor@gsoft.com.au>
References:  <6861.1133349506@critter.freebsd.dk> <200511302252.05741.doconnor@gsoft.com.au>

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

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

Daniel O'Connor wrote:
> On Wed, 30 Nov 2005 21:48, Poul-Henning Kamp wrote:
> > In message <20051130111017.GA67032@galgenberg.net>, Ulrich Spoerlein wr=
ites:
> > >I just read that mmap() part and have to wonder: Is it possible to
> > >introduce something like the guard pages that OpenBSD has implemented?
> > >I'd love to try this out and see the dozens of applications that fail
> > >due to off-by-one bugs.
> >
> > Guard-pages are very expensive and that is why I have not adopted
> > OpenBSD's patch.

Yes, of course it should be disabled as default, but if it could be
implemented so you can switch at runtime or compile time (think
INVARIANTS/WITNESS) *and* there is no penalty for the disabled case,
that be nice.

> > I would advocate that people use one of the dedicated debugging malloc
> > implementations (ElectricFence ?) instead of putting too much overhead
> > into our default malloc.
>=20
> Electric fence is right. Although it IS slow, an order of magnitude or mo=
re=20
> usually. Also if you do use it you'll probably have to bump up the=20
> vm.max_proc_mmap sysctl or it will fail to allocate memory.
>=20
> Another good one is valgrind (and it detects more problems to boot :)

Yes, I usualy use dmalloc and valgrind. It's sad other developers don't
use any of these tools ...

Ulrich Spoerlein
--=20
 PGP Key ID: F0DB9F44				Encrypted mail welcome!
Fingerprint: F1CE D062 0CA9 ADE3 349B  2FE8 980A C6B5 F0DB 9F44
Ok, which part of "Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn."
didn't you understand?

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

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

iD8DBQFDjZtbmArGtfDbn0QRAl4bAJ9tbnYVS6dcbs0yG71W0wAqyYclfACglQEV
xGjhAX6qdaQbbafU2ESQqZU=
=oPSq
-----END PGP SIGNATURE-----

--ZPt4rx8FFjLCG7dd--



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