Changeset 595


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

Report peak memory used upon exiting

Location:
pjproject/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/samples/pjsip-perf.c

    r593 r595  
    756756        pj_pool_release(app.pool); 
    757757        app.pool = NULL; 
    758         PJ_LOG(3,(THIS_FILE, "caching pool free capacity: %uMB", 
    759                              app.cp.capacity / 1000000)); 
     758        PJ_LOG(3,(THIS_FILE, "Peak memory size: %uMB", 
     759                             app.cp.peak_used_size / 1000000)); 
    760760        pj_caching_pool_destroy(&app.cp); 
    761761    } 
  • 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.