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:
Benny Prijono 2006-07-09 10:06:44 +00:00
parent c6e165f8d1
commit 1ef06dfc33
2 changed files with 4 additions and 13 deletions

View File

@ -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);
}
}

View File

@ -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);