[cvs] bogofilter/src datastore_sqlite.c,1.20,1.21

Matthias Andree matthias.andree at gmx.de
Tue Mar 15 13:34:23 CET 2005


David Relson <relson at osagesoftware.com> writes:

> When storage is allocated with xstrdup or xmalloc, it _must_ be freed
> with _xfree_ in order for memdebug to work!!!

Then memdebug is the wrong approach or has implementation flaws; in
fact, I've never felt the desire to use it - side from my not seeing
allocation bugs, leaks, double free, NULL free etc. inside
datastore_sqlite.c, which is easy enough to check.

It should be possible to use memdebug.h to also detour malloc, calloc,
realloc and free to the debugging functions.

There are heaps of other systems, depending on the exact figures or
circumstances you want to know, in alphabetic order - xmalloc is just a
"if fail, exit()" extended variant of malloc, if it does debugging, it's
not documented in xmalloc.h - and that is the ONLY place I'll ever read
about xmalloc/xfree behavior. If memdebug has something to say about
xmalloc or xfree, I don't care.

Here's the list of debugging tools I can recall off-hand:

boehm-gc, Boehm-Demers-Weiser Conservative Garbage Collector
dmalloc
efence, Electric Fence
GNU libc
memprof
purify (commercial)
valgrind
yamd

There's yet another fast, commercial system listed on freshmeat
whose name I've forgotten.

-- 
Matthias Andree
_______________________________________________
Bogofilter-dev mailing list
Bogofilter-dev at bogofilter.org
http://www.bogofilter.org/mailman/listinfo/bogofilter-dev



More information about the bogofilter-dev mailing list