[Freeswitch-users] Best practices for memory pool usage in modules?

Anthony Minessale anthony.minessale at gmail.com
Sat Aug 3 02:46:51 MSD 2013


If the object has a complex life cycle then pools are better.  If its short
lived frequent little one-off allocations may as well malloc
On Aug 2, 2013 4:40 PM, "Nathan Neulinger" <nneul at mst.edu> wrote:

> I'm looking into memory leak issues with mod_skinny, and it seems clear
> that it's repeatedly allocating memory when it
> doesn't really need to hang onto it permanently.
>
> Since it has both a long standing connection to each device (listener) and
> has requests coming in regularly that
> currently are allocating memory and appear to be leaking it since the
> listener stays around.
>
> Would having the code allocate a new temporary sub-pool for each request
> that comes in be appropriate, or would it be
> better to just use regular malloc for those allocate/use/destroy cases?
>
> -- Nathan
>
> ------------------------------------------------------------
> Nathan Neulinger                       nneul at mst.edu
> Missouri S&T Information Technology    (573) 612-1412
> System Administrator - Architect
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130802/2845797a/attachment.html 


Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list