[asterisk-dev] Debugging memory use in Asterisk

Mark Michelson mmichelson at digium.com
Fri May 15 09:03:57 CDT 2009


Benny Amorsen wrote:
> I have an Asterisk which uses a lot of memory:
>  8161 asterisk  20   0 5170m 604m 1248 S  0.3 60.3 386:39.32 asterisk
> 
> I would like to see what Asterisk actually uses the memory for. Is there
> a handy way to do that?
> 
> Asterisk version is 1.6.1.0.
> 
> 
> /Benny
> 

There is a menuselect option called MALLOC_DEBUG that you can enable in the 
"Compiler Options" section. This will allow you to use two new CLI commands: 
memory show summary, and memory show allocations. The first command will show 
the allocations made by each file, and the second will show each individual 
allocation that Asterisk has made. memory show summary is likely to be more helpful.

Mark Michelson



More information about the asterisk-dev mailing list