[Dovecot] Finding memory leaks
Timo Sirainen
tss at iki.fi
Fri May 2 10:06:58 UTC 2014
On 12.3.2014, at 15.30, Philipp Brüll <bruell at simiatech.com> wrote:
> I try to find a memory leak in a dovecot plugin that I develop. In
> order to find it, it would be helpful to print the total amount of
> memory that is currently allocated. This print could than spread over
> the source code and the memory consumption can be tracked.
>
> I've tried
>
> i_debug("pool size %u",
> (unsigned int)pool_alloconly_get_total_alloc_size(system_pool));
>
> But that failed. Does someone has a good advice?
Dovecot doesn't track total memory usage.
> I would like to avoid complex solutions like valgrind.
I always use valgrind, for example with imap:
service imap {
executable = /usr/bin/valgrind -q --leak-check=full /usr/local/libexec/dovecot/imap
}
More information about the dovecot
mailing list