Hello, We are sending some binary data encoded using base64 inside a SIP MESSAGE. The average size of the data we are sending is about 20K, so we need to increase the size defined by PJSIP_MAX_PKT_LEN which is set initially to 4000. We've set this size to 40000 Browsing the code, we've discovered there are at least two points where a piece of PJSIP_MAX_PKT_LEN bytes is allocated, once in the stack and other in the heap. >From those two, the more expensive (in terms of memory) is the one inside the function "pjsip_tx_data_encode" of sip_transport.c: tdata->buf.start = (char*) pj_pool_alloc(tdata->pool, PJSIP_MAX_PKT_LEN); This sentence allocs 40k (in our case) of dynamic memory each time a packet is sent, even though the amount of data which is sent is smaller than that (i.e sending a REGISTER message). Do you know if increasing the size of PJSIP_MAX_PKT_LEN to that extent is advisable? Will we have any problem derived of this value? Thanks in advance KR. Roberto. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20111215/6717c7b2/attachment.html>