Report peak memory used upon exiting
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@595 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
parent
c6e165f8d1
commit
1ef06dfc33
|
@ -755,8 +755,8 @@ static void destroy_app()
|
|||
if (app.pool) {
|
||||
pj_pool_release(app.pool);
|
||||
app.pool = NULL;
|
||||
PJ_LOG(3,(THIS_FILE, "caching pool free capacity: %uMB",
|
||||
app.cp.capacity / 1000000));
|
||||
PJ_LOG(3,(THIS_FILE, "Peak memory size: %uMB",
|
||||
app.cp.peak_used_size / 1000000));
|
||||
pj_caching_pool_destroy(&app.cp);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -343,17 +343,8 @@ on_return:
|
|||
flush_events(500);
|
||||
|
||||
/* Dumping memory pool usage */
|
||||
{
|
||||
pj_pool_t *p;
|
||||
unsigned sz = 0;
|
||||
p = caching_pool.used_list.next;
|
||||
while (p != (pj_pool_t*)&caching_pool.used_list) {
|
||||
sz += pj_pool_get_capacity(p);
|
||||
p = p->next;
|
||||
}
|
||||
PJ_LOG(3,(THIS_FILE, "Caching pool total capacity=%u",
|
||||
caching_pool.capacity + sz));
|
||||
}
|
||||
PJ_LOG(3,(THIS_FILE, "Peak memory size=%u MB",
|
||||
caching_pool.peak_used_size / 1000000));
|
||||
|
||||
pjsip_endpt_destroy(endpt);
|
||||
pj_caching_pool_destroy(&caching_pool);
|
||||
|
|
Loading…
Reference in New Issue