Changeset 3197


Ignore:
Timestamp:
Jun 3, 2010 4:18:11 PM (14 years ago)
Author:
bennylp
Message:

Make TURN pool memory sizes compile-time configurable (misc, re: #1068)

Location:
pjproject/trunk/pjnath
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjnath/include/pjnath/config.h

    r2966 r3197  
    468468#endif 
    469469 
     470/** TURN session initial pool size */ 
     471#ifndef PJNATH_POOL_LEN_TURN_SESS 
     472#   define PJNATH_POOL_LEN_TURN_SESS                1000 
     473#endif 
     474 
     475/** TURN session pool increment size */ 
     476#ifndef PJNATH_POOL_INC_TURN_SESS 
     477#   define PJNATH_POOL_INC_TURN_SESS                1000 
     478#endif 
     479 
     480/** TURN socket initial pool size */ 
     481#ifndef PJNATH_POOL_LEN_TURN_SOCK 
     482#   define PJNATH_POOL_LEN_TURN_SOCK                1000 
     483#endif 
     484 
     485/** TURN socket pool increment size */ 
     486#ifndef PJNATH_POOL_INC_TURN_SOCK 
     487#   define PJNATH_POOL_INC_TURN_SOCK                1000 
     488#endif 
    470489 
    471490/** 
  • pjproject/trunk/pjnath/src/pjnath/turn_session.c

    r3028 r3197  
    257257 
    258258    /* Allocate and create TURN session */ 
    259     pool = pj_pool_create(cfg->pf, name, 1000, 1000, NULL); 
     259    pool = pj_pool_create(cfg->pf, name, PJNATH_POOL_LEN_TURN_SESS, 
     260                          PJNATH_POOL_INC_TURN_SESS, NULL); 
    260261    sess = PJ_POOL_ZALLOC_T(pool, pj_turn_session); 
    261262    sess->pool = pool; 
  • pjproject/trunk/pjnath/src/pjnath/turn_sock.c

    r3028 r3197  
    143143 
    144144    /* Create and init basic data structure */ 
    145     pool = pj_pool_create(cfg->pf, name_tmpl, 1000, 1000, NULL); 
     145    pool = pj_pool_create(cfg->pf, name_tmpl, PJNATH_POOL_LEN_TURN_SOCK, 
     146                          PJNATH_POOL_INC_TURN_SOCK, NULL); 
    146147    turn_sock = PJ_POOL_ZALLOC_T(pool, pj_turn_sock); 
    147148    turn_sock->pool = pool; 
Note: See TracChangeset for help on using the changeset viewer.