<div dir="ltr">Hi Maxim,<div>  Thanks for the reply. </div><div>If any module consumes lot of memory, resets and still goes on consume more memory than earlier we could end up with lots of wasted memory.  </div><div>You are right that we would not end with current as NULL as long as memory available.</div>

<div><br></div><div>Thanks,</div><div>-Ravi.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 16, 2014 at 4:07 PM, Maxim Dounin <span dir="ltr"><<a href="mailto:mdounin@mdounin.ru" target="_blank">mdounin@mdounin.ru</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br>
<div><div class="h5"><br>
On Thu, Jan 16, 2014 at 02:56:53PM -0800, Ravi Chunduru wrote:<br>
<br>
> Hi Nginx experts,<br>
>   I am new to nginx and started looking into the code to understand the<br>
> architecture.<br>
><br>
> Currently, I am looking into nginx pool implementation. I have a question<br>
> on ngx_reset_pool().<br>
> It seems to set back 'last' to the location as expected. But why 'current'<br>
> and 'failed' are not reset.<br>
><br>
> Does it not make those memory blocks which are not no more referenced by<br>
> parsing from 'current' made useless?<br>
<br>
</div></div>It looks like a bug.  Mostly harmless though - the<br>
ngx_reset_pool() is a function introduced specifically to save<br>
some memory while reading big geo databases.  Since introduction<br>
it's only used in the geo module, and I don't think it's possible<br>
to hit p->current != pool case there.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Maxim Dounin<br>
<a href="http://nginx.org/" target="_blank">http://nginx.org/</a><br>
<br>
_______________________________________________<br>
nginx-devel mailing list<br>
<a href="mailto:nginx-devel@nginx.org">nginx-devel@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx-devel" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx-devel</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Ravi<br>
</div>