[asterisk-users] valgrind + Asterisk

Tzafrir Cohen tzafrir.cohen at xorcom.com
Thu Aug 17 05:52:20 MST 2006


On Thu, Aug 17, 2006 at 02:37:52PM +0200, yusuf wrote:
> Hi,
> 
> has anybody got valgring to work with asterisk

Yes

> 
> i do a
> -- valgrind --tool=memcheck -v asterisk -cvvvvvvvv
> 
> then Asterisk just dies.

What version of asterisk? Did you use any special build options to build
it?

> 
> The problem I have is that on the box I have Asterisk running, the memory 
> is reported as being used up, then when there is liitle ram left, the box 
> just hangs.  

What do you mean?

tzafrir at frenkel:~$ free
             total       used       free     shared    buffers     cached
Mem:        237124     231096       6028          0     35700      36992
-/+ buffers/cache:     158404      78720
Swap:       976744      69024     907720

This box aparantly has only 6028kb availble. However if you ignore
memory that the kernel temporarily uses for its own optimizations
(buffering and such) it actually has almost 78720 kb free. 

>  So Asterisk might have a memory leak, and I am trying to find 
> it.

To debug memory allocations, build asterisk with memory debugging.
Probably a lot less overhead than valgrind. Look for "astmm".

-- 
Tzafrir Cohen         sip:tzafrir at local.xorcom.com
icq#16849755          iax:tzafrir at local.xorcom.com
+972-50-7952406          jabber:tzafrir at jabber.org
tzafrir.cohen at xorcom.com     http://www.xorcom.com



More information about the asterisk-users mailing list