Changes between Version 3 and Version 4 of PJNATH_Memory_Usage


Ignore:
Timestamp:
Jun 4, 2010 6:34:51 PM (9 years ago)
Author:
bennylp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PJNATH_Memory_Usage

    v3 v4  
    241241== Crash Course on ICE == 
    242242 
    243 Let me explain briefly how ICE in PJNATH works, in order to understand where the memory is used. It will be good if you also read the [http://www.pjsip.org/pjnath/docs/html/index.htm PJNATH manual]. For each object mentioned below, I will also give the memory pool name format to recognize them in the memory dump output later, in square brackets. For example, "STUN session {{{[stuntp%p]}}}" means the STUN session is using memory pool which name is formatted with printf like "stuntp%p" format, e.g. "stuntp0x12345678". So here it goes. 
     243Let me explain briefly how ICE in PJNATH works, in order to understand where the memory is used. It will be good if you also read the [http://www.pjsip.org/pjnath/docs/html/index.htm PJNATH manual]. For each object mentioned below, I will also give the memory pool name format to recognize them in the memory dump output later, in square brackets. For example, "STUN session {{{[stuntp%p]}}}" means the STUN session is using memory pool which name is formatted with printf like "stuntp%p" format, e.g. "stuntp0x12345678". The value given to the "%p" argument actually is the memory location of the object. 
     244 
     245So here it goes. 
    244246 
    245247 
     
    252254These objects are created during PJSUA-LIB initialization, and will be kept alive throughout. 
    253255 
    254 If ICE is enabled, each call will require one ''PJMEDIA ICE media transport'' {{{[icetp%p]}}}, which in turn creates one ''ICE stream transport'' {{{[icetp%p]}}}. Each of these will have two ICE components by default (i.e. RTP and RTCP components). For each component, one ''STUN socket transport'' {{{[stuntp%p]}}} and one ''TURN socket transport'' {{{[udprel%p]}}} will be created. 
     256If ICE is enabled, each call will require one ''PJMEDIA ICE media transport'' {{{[icetp%d]}}}, which in turn creates one ''ICE stream transport'' {{{[icetp%d]}}}. Each of these will have two ICE components by default (i.e. RTP and RTCP components). For each component, one ''STUN socket transport'' {{{[stuntp%p]}}} and one ''TURN socket transport'' {{{[udprel%p]}}} will be created. 
    255257 
    256258The ''STUN socket transport'' in turn will create one ''STUN session''. which each will create another pool for incoming packet buffer. All of these use {{{[stuntp%p]}}} pool name format. 
     
    293295Each outgoing STUN packet allocates one {{{[tdata%p]}}} pool. Normally these buffers will be kept for few seconds due to retransmissions. 
    294296 
    295  ''Note: the SIP transmit buffer is named {{{[tdta%p]}}}. Did you notice the difference?'' 
     297 ''Note: the SIP transmit buffer is named rather similarly: {{{[tdta%p]}}}. Did you notice the difference?'' 
    296298 
    297299Sample dump of objects related to NAT type checker: