Re: dlmalloc

From: Andres Kroonmaa <andre@dont-contact.us>
Date: Wed, 17 Dec 2003 21:28:57 +0200

On 17 Dec 2003 at 17:22, Henrik Nordstrom wrote:

> On Wed, 17 Dec 2003, Andres Kroonmaa wrote:
>
> > Yes, but there remains issue with memory fragmentation, to solve which
> > there is sense in coordinating assumptions of both malloc and pools.
> > Chunks are longlived objects, and they can cause nasty holes in memspace,
> > that can be relieved by use of mmaped allocs. We could rely on known
> > malloc lib to do that, or opt to do that ourselves, repeating all the
> > portability stuff.
>
> I see it likely that one of the three general purpose malloc libraries
> shipped with Solaris works just as well as dlmalloc for Squid and without
> the risks involved in replacing the malloc package. (there is also at
> least two special purpose malloc libraries, but these are not suitable for
> Squid)

 Yeah, there are 6 (six) malloc libraries shipped with Solaris, 4 usable.
 Tried them all few years ago. They all suffer from excessive fragmentation
 and opt to request more memory from OS instead of doing their job better.
 Result looks like memory leaks. Some are tunable, but in nonstandard way.
 If tuning is needed, then its easier to bundle one good malloc instead of
 accounting for many out there..

 With Solaris, risks involved in replacing the malloc package is low if any,
 they've kept malloc api clear.

 But I do see your point, and perhaps you are right, if needed, malloc can
 be replaced without bundling one with Squid. Though its so small, and can
 avoid so much trouble to endusers.
Received on Wed Dec 17 2003 - 12:31:03 MST

This archive was generated by hypermail pre-2.1.9 : Wed Dec 24 2003 - 12:00:29 MST