<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><div class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div style="margin: 0px;" class=""><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif; color: rgb(127, 127, 127);" class=""><b class="">From:&nbsp;</b></span><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class="">Anthony Minessale &lt;<a href="mailto:anthony.minessale@gmail.com" class="">anthony.minessale@gmail.com</a>&gt;<br class=""></span></div><div style="margin: 0px;" class=""><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif; color: rgb(127, 127, 127);" class=""><b class="">Subject:&nbsp;</b></span><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class=""><b class="">Re: [Freeswitch-users] Memory allocation "switch_core_session_alloc"</b><br class=""></span></div><div style="margin: 0px;" class=""><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif; color: rgb(127, 127, 127);" class=""><b class="">Date:&nbsp;</b></span><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class="">March 31, 2016 at 1:51:48 AM GMT+3<br class=""></span></div><div style="margin: 0px;" class=""><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif; color: rgb(127, 127, 127);" class=""><b class="">To:&nbsp;</b></span><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class="">FreeSWITCH Users Help &lt;<a href="mailto:freeswitch-users@lists.freeswitch.org" class="">freeswitch-users@lists.freeswitch.org</a>&gt;<br class=""></span></div><div style="margin: 0px;" class=""><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif; color: rgb(127, 127, 127);" class=""><b class="">Reply-To:&nbsp;</b></span><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class="">FreeSWITCH Users Help &lt;<a href="mailto:freeswitch-users@lists.freeswitch.org" class="">freeswitch-users@lists.freeswitch.org</a>&gt;<br class=""></span></div><br class=""><br class=""><div dir="ltr" class="">Correct.&nbsp; The memory is allocated from the session's pool and will not be valid when the call ends.<div class=""><br class=""></div><div class="">For persistent memory allocation, create your own pool when the module loads, (or use the one passed to you in the init function) and use switch_core_alloc instead.</div><div class=""><br class=""></div><div class="">What module are you writing?</div><div class=""><br class=""></div><div class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Mar 30, 2016 at 4:48 PM, Ahmed habiba&nbsp;<span dir="ltr" class="">&lt;<a href="mailto:ahabiba@gmail.com" target="_blank" class="">ahabiba@gmail.com</a>&gt;</span>&nbsp;wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div style="word-wrap: break-word;" class="">Hi,<div class=""><br class=""></div><div class="">I’m trying to use “switch_core_session_alloc” in a new module however I notice in documentation the below note, does this mean that once the session hangup this memory segment will not be valid anymore and I should not use this segment again?, your kind feedback will be appreciated.</div><div class=""><br class=""></div><div class=""><dt style="font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px;" class=""><b class=""><i class="">"Note:</i></b></dt><dd style="font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px;" class=""><i class="">the memory will be in scope as long as the session exists"</i></dd><div class=""><br class=""></div></div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""></div><div class="">Ahmed Habiba.</div></div><br class="">_________________________________________________________________________<br class="">Professional FreeSWITCH Consulting Services:<br class=""><a href="mailto:consulting@freeswitch.org" class="">consulting@freeswitch.org</a><br class=""><a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank" class="">http://www.freeswitchsolutions.com</a><br class=""><br class="">Official FreeSWITCH Sites<br class=""><a href="http://www.freeswitch.org" rel="noreferrer" target="_blank" class="">http://www.freeswitch.org</a><br class=""><a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank" class="">http://confluence.freeswitch.org</a><br class=""><a href="http://www.cluecon.com" rel="noreferrer" target="_blank" class="">http://www.cluecon.com</a><br class=""><br class="">FreeSWITCH-users mailing list<br class=""><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" class="">FreeSWITCH-users@lists.freeswitch.org</a><br class=""><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank" class="">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br class="">UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank" class="">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br class=""><a href="http://www.freeswitch.org" rel="noreferrer" target="_blank" class="">http://www.freeswitch.org</a><br class=""></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>--&nbsp;<br class=""><div class="gmail_signature"><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class="">Anthony Minessale II &nbsp; &nbsp; &nbsp; ♬ @anthmfs&nbsp;&nbsp;♬ @FreeSWITCH&nbsp;&nbsp;♬<div class=""><br class=""><div class="">☞&nbsp;<a href="http://freeswitch.org/" target="_blank" class="">http://freeswitch.org/</a>&nbsp;&nbsp;☞&nbsp;<a href="http://cluecon.com/" target="_blank" class="">http://cluecon.com/</a>&nbsp;&nbsp;☞&nbsp;<a href="http://twitter.com/FreeSWITCH" target="_blank" class="">http://twitter.com/FreeSWITCH</a></div><div class=""><div class="">☞&nbsp;<a href="http://irc.freenode.net" target="_blank" class="">irc.freenode.net</a>&nbsp;#freeswitch&nbsp;☞&nbsp;<u class=""><a href="http://freeswitch.org/g+" target="_blank" class="">http://freeswitch.org/g+</a></u><br class=""><br class=""></div><div class="">ClueCon Weekly Development Call&nbsp;<br class=""></div><div class="">☎&nbsp;<a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank" class="">sip:888@conference.freeswitch.org</a>&nbsp;&nbsp;☎ +19193869900&nbsp;</div><div class=""><br class=""></div></div></div><div class=""><a href="https://www.youtube.com/watch?v=9XXgW34t40s" target="_blank" style="color: rgb(17, 85, 204); font-size: 12.8000001907349px;" class="">https://www.youtube.com/watch?v=9XXgW34t40s</a></div><div class=""><a href="https://www.youtube.com/watch?v=NLaDpGQuZDA" target="_blank" class="">https://www.youtube.com/watch?v=NLaDpGQuZDA</a></div></div></div></div></div></div></div></div></body></html>