<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2900.2523" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial><FONT size=2><SPAN class=848160219-07122004>Hi
all,</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=848160219-07122004></SPAN></FONT></FONT> </DIV>
<DIV><FONT><SPAN class=848160219-07122004></SPAN><FONT face=Arial size=2>We
ha<SPAN class=848160219-07122004>v</SPAN>e been experiencing memory usage
increasing in Asterisk, sometimes reaching over 150MB. After compiling Asterisk
with the MALLOC_DEBUG option, I was able to see that some memory was allocated
and never freed in the ast_expr.y. Note that the leak is obvious because I do an
extensive usage of variable in the dialplan (GotoIf). Basically, I noticed that
the free_value() function frees the contents of the structure 'struct val', but
does not free the structure as is. I did the followng modification to ast_expr.y
and the leak seems to go away. </FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>218,220d217<BR><<BR>< if (vp)<BR>< free (vp);</DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><SPAN class=848160219-07122004><FONT face=Arial size=2>Any
feedback?</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><SPAN class=848160219-07122004><FONT face=Arial
size=2>Regards,</FONT></SPAN></DIV>
<DIV><SPAN class=848160219-07122004><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV align=left><FONT face=Arial size=2>Claude Klimos</FONT></DIV>
<DIV align=left><FONT face=Arial size=2>IT Director</FONT></DIV>
<DIV align=left><FONT face=Arial size=2>Aheeva Technology</FONT></DIV>
<DIV align=left><FONT face=Arial size=2>Tel.: 514-448-4905 #2210</FONT></DIV>
<DIV align=left><FONT face="Arial Narrow" size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>