Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

Re: [milter-greylist] memory leak or normal behaviour?

2007-05-17 by Michael Fromme

Oliver Fromme schrieb:
>  > Sorry to say, but 4.0a4 still leaks memory with our configuration.
> 
> How do you determine that?

By observation : found one memory leak by strict definition,
and found a steady increase of virtual memory size.
I'd expect asymtotic memory usage of a properly tuned system.
If e.g. less than 50 MB raw data are stored then 500 MB
should be the maximum.

Finally I wrote some statistic routines with minimal
code intervention (e.g. malloc directed to call
safe_malloc by macro), fought with debug-crashes and
got some numbers.
These indicate no further leak by strict defintion,
but fragmentation for our configuration.

Still only a hypothesis: blocks with diffent sizes ~ 65536
can't be reclaimed. I will test if it helps to allocate these
with sizes rounded to 4K boundaries.
Probably they are allocated in real_body. I did not expect that,
but a rule
racl greylist from ...
fires acl_add_clause, which sets conf.c_maxpeek to -1

My tool files available on request:
mtool.c
mtool.h  to be included in conf.h, conf_lex.l, conf_yacc.l

Best regards,

Michael

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.