SIP header allocation for pjsua_call_make_call()

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

 



[A better subject line might be "memory pool best practices".]

What is the best way to allocate SIP headers to pass to pjsua_call_make_call()?  I have a map of SIP header-value pairs. I don't know whether to allocate pjsip_generic_string_hdr from a pool or to use new().  Please advise me.

If I use a pool, is it one pool per call or one pool for all calls?  If it's a shared pool, can I reuse the pjsip_generic_string_hdr in it?  Does the pool take care of that for me?

If I allocate pjsip_generic_string_hdr myself, when can I free() them?  When pjsua_call_make_call() returns?  In my on_stream_destroyed callback?

Dave

_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

[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