Ignore:
Timestamp:
Jul 9, 2006 10:06:44 AM (18 years ago)
Author:
bennylp
Message:

Report peak memory used upon exiting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/test-pjsip/test.c

    r589 r595  
    344344 
    345345    /* Dumping memory pool usage */ 
    346     { 
    347         pj_pool_t *p; 
    348         unsigned sz = 0; 
    349         p = caching_pool.used_list.next; 
    350         while (p != (pj_pool_t*)&caching_pool.used_list) { 
    351             sz += pj_pool_get_capacity(p); 
    352             p = p->next; 
    353         } 
    354         PJ_LOG(3,(THIS_FILE, "Caching pool total capacity=%u", 
    355                               caching_pool.capacity + sz)); 
    356     } 
     346    PJ_LOG(3,(THIS_FILE, "Peak memory size=%u MB", 
     347                         caching_pool.peak_used_size / 1000000)); 
    357348 
    358349    pjsip_endpt_destroy(endpt); 
Note: See TracChangeset for help on using the changeset viewer.