<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    <div class="moz-cite-prefix">On 22/08/14 09:38, Morten Tryfoss
      wrote:<br>
    </div>
    <blockquote cite="mid:D01CC00E.24785%25morten@phonero.no"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <div>Hi,</div>
      <div><br>
      </div>
      <div>I wonder about the difference between “used” and “real used”
        shared memory in Kamailio.</div>
    </blockquote>
    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).<br>
    <br>
    The used is counte only from parameters of xmalloc. All the extra
    fields and padding the size are counted to get the real used.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Next Kamailio Advanced Trainings 2014 - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
Sep 22-25, Berlin, Germany</pre>
  </body>
</html>