[asterisk-dev] asterisk memory leaks

Tzafrir Cohen tzafrir.cohen at xorcom.com
Tue Nov 4 07:12:33 CST 2008


On Tue, Nov 04, 2008 at 06:04:49AM -0600, Mark Spowage wrote:
> with the latest 1.6 code,  asterisk looses memory , when it takes a
> call to provide music on hold, via sip
> 
>               total         used         free       shared      buffers
>  Mem:        62492        54064         8428            0         8656
>  Swap:            0            0            0
> Total:        62492        54064         8428
> # free
>               total         used         free       shared      buffers
>   Mem:        62492        54068         8424            0         8656
>  Swap:            0            0            0
> Total:        62492        54068         8424

Those numbers are practically meaningless. It could be any other
process.

The difference here is just 4 kb. Just an extra allocation of a page.
This could be from one random call. One extra process. 

To get more useful data:

1. Sample the data more often. e.g.: once an hour, with a script.

2. Build Asterisk with memory allocaiton debugging (requires enabling
dev mode, and has an overhead). This will allow you to see which part in
Asterisk (and even: which exact call of malloc) is respossible for the
constantly-increasing memory.

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



More information about the asterisk-dev mailing list