question on ngx_reset_pool() 'current' pointer not reset
ravivsn at gmail.com
Fri Jan 17 00:21:12 UTC 2014
Thanks for the reply.
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.
You are right that we would not end with current as NULL as long as memory
On Thu, Jan 16, 2014 at 4:07 PM, Maxim Dounin <mdounin at mdounin.ru> wrote:
> On Thu, Jan 16, 2014 at 02:56:53PM -0800, Ravi Chunduru wrote:
> > Hi Nginx experts,
> > I am new to nginx and started looking into the code to understand the
> > architecture.
> > Currently, I am looking into nginx pool implementation. I have a question
> > on ngx_reset_pool().
> > It seems to set back 'last' to the location as expected. But why
> > and 'failed' are not reset.
> > Does it not make those memory blocks which are not no more referenced by
> > parsing from 'current' made useless?
> It looks like a bug. Mostly harmless though - the
> ngx_reset_pool() is a function introduced specifically to save
> some memory while reading big geo databases. Since introduction
> it's only used in the geo module, and I don't think it's possible
> to hit p->current != pool case there.
> Maxim Dounin
> nginx-devel mailing list
> nginx-devel at nginx.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nginx-devel