Memory Leak problem with Pool

刘猛
Fri, Jul 7, 2017 8:03 AM

/Hi: /    I need send UPDATE to peer every 5 seconds so I can get
peer's session state from the response. When I keep the session for a long time,
I find that the memory is grow. I find that/each time I run /pjsua_call_update2()
function,it calls pjsip_inv_send_msg(),and pjsip_inv_send_msg() calls
PJ_POOL_ZALLOC_T(inv->pool, struct tsx_inv_data); we know that inv->pool is a
long term pool, its life time is synchronized with invite_session. It will be
released only when the session is destoryed; I modify the PJ_POOL_ZALLOC()'s param
in pjsip_inv_send_msg()function, repleace the inv->pool with rdata->pool and the
memory dose not grow any more! Can I believe that the problem is resolved??

/If anyone has any suggestions or advice, I would really, //really appreciate it!/
///LiuMeng/

/Hi: / I need send UPDATE to peer every 5 seconds so I can get peer's session state from the response. When I keep the session for a long time, I find that the memory is grow. I find that/each time I run /pjsua_call_update2() function,it calls pjsip_inv_send_msg(),and pjsip_inv_send_msg() calls PJ_POOL_ZALLOC_T(inv->pool, struct tsx_inv_data); we know that inv->pool is a long term pool, its life time is synchronized with invite_session. It will be released only when the session is destoryed; I modify the PJ_POOL_ZALLOC()'s param in pjsip_inv_send_msg()function, repleace the inv->pool with rdata->pool and the memory dose not grow any more! Can I believe that the problem is resolved?? /If anyone has any suggestions or advice, I would really, //really appreciate it!/ ///LiuMeng/
YZ
Yuming Zheng
Mon, Jul 10, 2017 7:31 AM

Hi,
Which state do you want go get from the peer?
Why not use the light weight rtcp mechanism to get
these state?

Best Regards,

Frank

2017-07-07 16:03 GMT+08:00 刘猛 meng.liu@bqvision.com:

Hi:

  • I need send UPDATE to peer every 5 seconds so I can get
    peer's session state from the response. When I keep the session for a long time,
    I find that the memory is grow. I find that* each time I run *pjsua_call_update2()
    function,it calls pjsip_inv_send_msg(),and pjsip_inv_send_msg() calls
    PJ_POOL_ZALLOC_T(inv->pool, struct tsx_inv_data); we know that inv->pool is a
    long term pool, its life time is synchronized with invite_session. It will be
    released only when the session is destoryed; I modify the PJ_POOL_ZALLOC()'s param
    in pjsip_inv_send_msg()function, repleace the inv->pool with rdata->pool and the
    memory dose not grow any more! Can I believe that the problem is resolved??
    *If anyone has any suggestions or advice, I would really, **really appreciate it!*LiuMeng

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

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

Hi, Which state do you want go get from the peer? Why not use the light weight rtcp mechanism to get these state? Best Regards, Frank 2017-07-07 16:03 GMT+08:00 刘猛 <meng.liu@bqvision.com>: > * > > Hi: > * I need send UPDATE to peer every 5 seconds so I can get > peer's session state from the response. When I keep the session for a long time, > I find that the memory is grow. I find that* each time I run *pjsua_call_update2() > function,it calls pjsip_inv_send_msg(),and pjsip_inv_send_msg() calls > PJ_POOL_ZALLOC_T(inv->pool, struct tsx_inv_data); we know that inv->pool is a > long term pool, its life time is synchronized with invite_session. It will be > released only when the session is destoryed; I modify the PJ_POOL_ZALLOC()'s param > in pjsip_inv_send_msg()function, repleace the inv->pool with rdata->pool and the > memory dose not grow any more! Can I believe that the problem is resolved?? > *If anyone has any suggestions or advice, I would really, **really appreciate it!**LiuMeng* > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > >