<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>AVPs eat up shared memory. For each "lookup()" you perform on a
      different INVITE request, a different $avp(attr) will be populated
      with the attributes of each contact behind the AoR you looked up.
      All AVPs of a transaction are then freed along with the
      transaction itself.<br>
    </tt>
    <pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
    <div class="moz-cite-prefix">On 01.06.2016 21:19, Rodrigo Pimenta
      Carvalho wrote:<br>
    </div>
    <blockquote
cite="mid:BY2PR02MB16553EEBDC654A27A3478399B5470@BY2PR02MB1655.namprd02.prod.outlook.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
      <div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
        <h3 class="title"><span style="font-size: 11pt;">Hi.</span><br>
          <code class="varname"></code></h3>
        <h3 class="title"><span style="font-size: 11pt;">I'm using
            OpenSIPS 2.1 and the module REGISTRAR.</span></h3>
        <h3 class="title"><span style="font-size: 11pt;">So, in my
            script I have:</span></h3>
        <pre class="programlisting"><span style="font-size: 11pt;">modparam("registrar", "attr_avp", "$avp(attr)")

...
if (is_method("REGISTER")) {
        $avp(attr) = "contact_info";
        save("location");
        exit;
}
...
lookup("location");</span></pre>
        <br>
        <h3 class="title"><span style="font-size: 11pt;">I would like to
            know whether every time such code is executed the available
            memory decreases. What happens? Does the avp demand more and
            more memory to keep its information about lots of
            "contact_info"?</span></h3>
        <h3 class="title"><code class="varname"><span style="font-size:
              11pt;">Any hint will be very helpful!</span></code></h3>
        <br>
        <code>Thanks alot.</code><br>
        <p><br>
        </p>
        <div id="Signature">
          <div name="divtagdefaultwrapper"
            style="font-family:Calibri,Arial,Helvetica,sans-serif;
            font-size:; margin:0">
            <div class="BodyFragment"><font size="2">
                <div class="PlainText">RODRIGO PIMENTA CARVALHO<br>
                  Inatel Competence Center<br>
                  Software<br>
                  Ph: +55 35 3471 9200 RAMAL 979<br>
                </div>
              </font></div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>