[asterisk-dev] [asterisk-commits] tilghman: trunk r221920 - /trunk/main/logger.c

Atis Lezdins atis at iq-labs.net
Sun Oct 4 10:38:58 CDT 2009


On Fri, Oct 2, 2009 at 6:34 PM, Kevin P. Fleming <kpfleming at digium.com> wrote:
> Tilghman Lesher wrote:
>
>> Valgrind did not report that it was not initialized.  However, the log message
>> list had 4GB of memory allocated to it, and it was still growing.  I looked
>> through the code and what it appeared like to me was that the thread was
>> started at boot and immediately exited, thus the memory wasn't likely to ever
>> be freed.
>
> Bizarre. I'd suggest adding a printf() in logger_init() to show the
> value of that variable without the explicit initialization, just to
> confirm that it was already zero... we have dozens of other module-scope
> variables throughout Asterisk already that we rely on being
> automatically initialized to zero.
>

I was able to test that the memory consumption is because logger
thread can't process all the messages that get posted. Maybe I was
just lucky obtaining that output of "memory show allocations" before
asterisk locked, and it has nothing to do with this patch.

I'm currently testing with my patch (logger_repeating.patch from issue
https://issues.asterisk.org/view.php?id=15973), and it seems to help
with memory issues.

Regards,
Atis

-- 
Atis Lezdins,
VoIP Project Manager / Developer,
IQ Labs Inc,
atis at iq-labs.net
Skype: atis.lezdins
Cell Phone: +371 28806004
Cell Phone: +1 800 7300689
Work phone: +1 800 7502835



More information about the asterisk-dev mailing list