memdebug [was: [cvs] bogofilter/src datastore_sqlite.c]

David Relson relson at osagesoftware.com
Tue Mar 15 13:45:08 CET 2005


On Tue, 15 Mar 2005 13:34:23 +0100
Matthias Andree wrote:

> 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.

Memdebug redefines xmalloc, xfree, etc.  I'll look to see if it can
work with malloc and free.

That you don't use it is unimportant.  It allows me to identify total
number of allocations, their total size, high water mark, etc and
exactly which xmalloc call is lacking an xfree call,

_______________________________________________
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