dlmalloc

From: Andres Kroonmaa <andre@dont-contact.us>
Date: Mon, 15 Dec 2003 12:46:13 +0200

 hi,

 in bug http://www.squid-cache.org/bugs/show_bug.cgi?id=839
 Henrik made this comment:

> Got latest night snapshot 20031126,
> configure with dlmalloc,
> when compile, says:
> cc1: warnings being treated as errors
> dlmalloc.c:3015: warning: no previous prototype for `malloc_stats'
>
> ------- Additional Comment #1 From Henrik Nordstrom 2003-11-26 09:10 -------
> Squid-3 is most likely not safe to compile with dlmalloc...
>
> 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?
 Instead of dropping dlmalloc, perhaps upgrade it from ver 2.6.4 (1996) to
 ver. 2.7.2 (2002)?

 The error itself is most probably due to mismatching prototype declarations,
 and failing on minor warnings. Fixable by this patch:

Index: dlmalloc.c
===================================================================
RCS file: /cvsroot/squid/squid3/lib/dlmalloc.c,v
retrieving revision 1.1
diff -u -r1.1 dlmalloc.c
--- dlmalloc.c 14 Oct 2002 00:18:18 -0000 1.1
+++ dlmalloc.c 15 Dec 2003 10:51:15 -0000
@@ -864,7 +864,7 @@
 void cfree(Void_t*);
 int malloc_trim(size_t);
 size_t malloc_usable_size(Void_t*);
-void malloc_stats();
+void malloc_stats(void);
 int mALLOPt(int, int);
 struct mallinfo mALLINFo(void);
 #else

------------------------------------
 Andres Kroonmaa <andre@online.ee>
 CTO, Microlink Data AS
 Tel: 6501 731, Fax: 6501 725
 Pärnu mnt. 158, Tallinn
 11317 Estonia
Received on Mon Dec 15 2003 - 03:59:07 MST

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