Ignore:
Timestamp:
Jul 13, 2008 1:12:36 PM (11 years ago)
Author:
bennylp
Message:

Ticket #564: Reduce the memory usage for default pjsip settings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsip/sip_config.h

    r2039 r2131  
    158158/** 
    159159 * Specify maximum transaction count in transaction hash table. 
    160  * Default value is 16*1024 
     160 * For efficiency, the value should be 2^n-1 since it will be 
     161 * rounded up to 2^n. 
     162 * 
     163 * Default value is 1023 
    161164 */ 
    162165#ifndef PJSIP_MAX_TSX_COUNT 
    163 #   define PJSIP_MAX_TSX_COUNT          (16*1024) 
     166#   define PJSIP_MAX_TSX_COUNT          (1024-1) 
    164167#endif 
    165168 
    166169/** 
    167170 * Specify maximum number of dialogs in the dialog hash table. 
    168  * Default value is 16*1024. 
     171 * For efficiency, the value should be 2^n-1 since it will be 
     172 * rounded up to 2^n. 
     173 * 
     174 * Default value is 511. 
    169175 */ 
    170176#ifndef PJSIP_MAX_DIALOG_COUNT 
    171 #   define PJSIP_MAX_DIALOG_COUNT       (16*1024) 
     177#   define PJSIP_MAX_DIALOG_COUNT       (512-1) 
    172178#endif 
    173179 
     
    554560 */ 
    555561#ifndef PJSIP_POOL_LEN_UA 
    556 #   define PJSIP_POOL_LEN_UA            4000 
     562#   define PJSIP_POOL_LEN_UA            512 
    557563#endif 
    558564 
     
    561567 */ 
    562568#ifndef PJSIP_POOL_INC_UA 
    563 #   define PJSIP_POOL_INC_UA            4000 
     569#   define PJSIP_POOL_INC_UA            512 
    564570#endif 
    565571 
     
    572578 
    573579/** 
    574  * Initial memory size for transaction layer 
     580 * Initial memory size for transaction layer. The bulk of pool usage 
     581 * for transaction layer will be used to create the hash table, so  
     582 * setting this value too high will not help too much with reducing 
     583 * fragmentation and the memory will most likely be wasted. 
    575584 */ 
    576585#ifndef PJSIP_POOL_TSX_LAYER_LEN 
    577 #   define PJSIP_POOL_TSX_LAYER_LEN     4000 
    578 #endif 
    579  
    580 /** 
    581  * Memory increment for transaction layer. 
     586#   define PJSIP_POOL_TSX_LAYER_LEN     512 
     587#endif 
     588 
     589/** 
     590 * Memory increment for transaction layer. The bulk of pool usage 
     591 * for transaction layer will be used to create the hash table, so  
     592 * setting this value too high will not help too much with reducing 
     593 * fragmentation and the memory will most likely be wasted. 
    582594 */ 
    583595#ifndef PJSIP_POOL_TSX_LAYER_INC 
    584 #   define PJSIP_POOL_TSX_LAYER_INC     4000 
     596#   define PJSIP_POOL_TSX_LAYER_INC     512 
    585597#endif 
    586598 
Note: See TracChangeset for help on using the changeset viewer.