When is pj_timer_heap_t/pj_timer_entry freed by pjsip?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello all,

also to the question, i find that the timer heap will be freed by endpoint
destroy "pjsip_endpt_destroy()". The problem I have is, that during using
an endpoint, "pjsua_schedule_timer2" function will be called by SIP
REGISTER/UNREGISTER, and the pj_timer_entry could be infinite times
malloced.

Parameters:poolThe pool where allocations in the timer heap will be
allocated. The timer heap will dynamicly allocate more storate from the
pool if the number of timer entries registered is more than the size
originally requested when calling this function.countThe maximum number of
timer entries to be supported initially. If the application registers more
entries during runtime, then the timer heap will resize.htPointer to
receive the created timer heap.

Based on the "pj_timer_heap_create" doc, the heap could be resized too.

My question now is, how/where can I call free the timer heap for an
endpoint, without destroy it?


Thanks

Pai


On Wed, Mar 13, 2013 at 3:41 PM, Pai Peng <sipaipv6 at gmail.com> wrote:

> Hello all,
>
> I have another question about pjsip in timer heap management.
>
>
> I am using the function "pjsua_schedule_timer2" for sleep event. And by
> testing with Xcode under iPhone device, I have noticed that the the
> allocated object "pj_timer_entry"is not freed after done, which is stored
> into heap node "copy_node".
>
> tmr = PJ_POOL_ALLOC_T(pjsua_var.pool, pjsua_timer_list);
>
> My question is, when these objects are freed in timer heap? Or is there
> memory leak?
>
>
> Regards,
>
> Pai
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20130314/41367fee/attachment-0001.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux