Ignore:
Timestamp:
Jul 6, 2006 2:28:45 PM (18 years ago)
Author:
bennylp
Message:

Set the caching pool workspace size in pjsip-test to 2MB (configurable)

File:
1 edited

Legend:

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

    r563 r589  
    244244    pj_dump_config(); 
    245245 
    246     pj_caching_pool_init( &caching_pool, &pj_pool_factory_default_policy, 0 ); 
     246    pj_caching_pool_init( &caching_pool, &pj_pool_factory_default_policy,  
     247                          PJSIP_TEST_MEM_SIZE ); 
    247248 
    248249    rc = pjsip_endpt_create(&caching_pool.factory, "endpt", &endpt); 
     
    341342on_return: 
    342343    flush_events(500); 
     344 
     345    /* 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    } 
     357 
    343358    pjsip_endpt_destroy(endpt); 
    344359    pj_caching_pool_destroy(&caching_pool); 
Note: See TracChangeset for help on using the changeset viewer.