Memory leak in -l creation

Matthias Andree matthias.andree at gmx.de
Mon Nov 24 17:22:58 CET 2003


On Sun, 23 Nov 2003, Chris Wilkes wrote:

> Think I found a source of my memory leak.  When I did a 

Please confirm that it's really a leak with tools like valgrind,
memprof, dmalloc or boehm-gc.

> on my 100+ mailboxes the free memory dropped from 400MB to 100.  Then
> when I deleted the wordlist.db-new files the vmstat memory usage shot
> up that second from 93MB to 433MB.
> 
> So it appears that the file created with the -l has some sort of lock on
> the memory, as not creating a new file doesn't cause the memory to dip
> at all.

Nothing that would survive the termination (regular or irregular) of the
process. I'd rather think that free memory gets assigned as buffer or
cache (it's reclaimable from that state) and when the file gets deleted
and the inode gets deallocated, the caches are freed as well since they
have nothing to cache.

So if the buffer or cache (or the sum thereof) figures increase roughly
by the same amount that the "free" memory decreases, everything is in
perfect order.




More information about the bogofilter-dev mailing list