Ignore:
Timestamp:
Aug 12, 2009 5:53:47 PM (15 years ago)
Author:
bennylp
Message:

Ticket #877: Memory consumption of the invite session grows indefinitely if call is running for long period of time and with many re-INVITES

  • introducing flip-flop pools in the pjsip_inv_session. There are two additional pools created, and one of them will be reset everytime SDP negotiation is done to release memory back to the OS
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c

    r2859 r2869  
    15971597        status = create_sdp_of_call_hold(call, &sdp); 
    15981598    } else { 
    1599         status = pjsua_media_channel_create_sdp(call->index, call->inv->pool,  
     1599        status = pjsua_media_channel_create_sdp(call->index,  
     1600                                                call->inv->pool_prov, 
    16001601                                                NULL, &sdp, NULL); 
    16011602        call->local_hold = PJ_FALSE; 
     
    16561657 
    16571658    /* Create SDP */ 
    1658     status = pjsua_media_channel_create_sdp(call->index, call->inv->pool,  
     1659    status = pjsua_media_channel_create_sdp(call->index,  
     1660                                            call->inv->pool_prov,  
    16591661                                            NULL, &sdp, NULL); 
    16601662    if (status != PJ_SUCCESS) { 
     
    32013203    pjmedia_sdp_session *sdp; 
    32023204 
    3203     /* Use call's pool */ 
    3204     pool = call->inv->pool; 
     3205    /* Use call's provisional pool */ 
     3206    pool = call->inv->pool_prov; 
    32053207 
    32063208    /* Create new offer */ 
     
    32683270              call->index)); 
    32693271 
    3270     status = pjsua_media_channel_create_sdp(call->index, call->inv->pool,  
     3272    status = pjsua_media_channel_create_sdp(call->index,  
     3273                                            call->inv->pool_prov,  
    32713274                                            offer, &answer, NULL); 
    32723275    if (status != PJ_SUCCESS) { 
     
    32973300         * (See RFC 3264 Section 8.4 and RFC 4317 Section 3.1) 
    32983301         */ 
    3299         attr = pjmedia_sdp_attr_create(call->inv->pool, "sendonly", NULL); 
     3302        attr = pjmedia_sdp_attr_create(call->inv->pool_prov, "sendonly", NULL); 
    33003303        pjmedia_sdp_media_add_attr(answer->media[0], attr); 
    33013304    } 
     
    33353338                  call->index)); 
    33363339 
    3337         status = pjsua_media_channel_create_sdp(call->index, call->inv->pool,  
     3340        status = pjsua_media_channel_create_sdp(call->index,  
     3341                                                call->inv->pool_prov,  
    33383342                                                NULL, offer, NULL); 
    33393343    } 
Note: See TracChangeset for help on using the changeset viewer.