On Mon, 15 Dec 2003, Andres Kroonmaa wrote: > > I propose we stop distributing dlmalloc with Squid. If the OS vendors malloc > > library is crap then use another OS vendor. > > This is very harsh comment and I'd like to understand reasons behind it. > Basically it says dump SUN/Solaris and perhaps many others. Solaris > malloc is ok stability wise, but its awful memory and cpu hog. > > So far dlmalloc has been very good malloc. Why is it not safe anymore?
It has never been really safe and this has bitten us to various degree several times in the past. The switch to C++ makes this some orders of magnitude more complex due to additional dependencies on memory management. Using dlmalloc makes assumptions on many things regarding how the C and C++ libraries interacts with the memory management. There is no public defined standard on how such interactions take place an is in the "implementation specific" details of both C, C++ and UNIX standards. > Instead of dropping dlmalloc, perhaps upgrade it from ver 2.6.4 (1996) to > ver. 2.7.2 (2002)? I don't really see why we should keep bundling a whole malloc implementation with Squid these days. If the OS cannot provide reasonable core services such as malloc then it is not a good OS in my opinion. If however the user wants to substitute the OS malloc implementation with another he is welcome, and I can accept having some hooks in Squid for allowing this in a reasonable manner. Regards Henrik
