memdebug.[ch]

David Relson relson at osagesoftware.com
Wed Mar 16 03:00:26 CET 2005


On Wed, 16 Mar 2005 02:51:34 +0100
Matthias Andree wrote:

> David Relson <relson at osagesoftware.com> writes:
> 
> > There are a number of places in bogofilter where the BerkeleyDB code
> > allocates storage which bogofilter frees.  
> 
> You can redefine Berkeley DB's allocation/release functions, see
> DB->set_alloc and DB_ENV->set_alloc in the Berkeley DB documentation.
> 
> In a nutshell, something like
> 
>     env->set_alloc(env, md_malloc, md_realloc, md_free);
> 
> would work for the transactional case,
> and for the non-transactional,
> 
>     dbp->set_alloc(dbp, md_malloc, md_realloc, md_free);
> 
> should do, where either of these must happen before the respective
> foo->open calls.

Neat!  I'll take a look at these.

_______________________________________________
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