[SR-Users] Shared memory

Daniel-Constantin Mierla miconda at gmail.com
Thu Sep 4 09:48:04 CEST 2014


Hello,

On 22/08/14 09:38, Morten Tryfoss wrote:
> Hi,
>
> I wonder about the difference between “used” and “real used” shared 
> memory in Kamailio.
Each allocated chunk of memory is encapsulated in a fragment that has 
additional fields (e.g., to be able to find prev/next fragment). Also, 
the allocator rounds up the size to match the internal bus size, 
otherwise can get a SIGBUS on various architectures (e.g., xmalloc(3) 
will return a chunk of size 4 on 32bit system).

The used is counte only from parameters of xmalloc. All the extra fields 
and padding the size are counted to get the real used.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Next Kamailio Advanced Trainings 2014 - http://www.asipto.com
Sep 22-25, Berlin, Germany

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20140904/453d82d9/attachment.html>


More information about the sr-users mailing list