Hi Maxim, 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 available.
Thanks, -Ravi. On Thu, Jan 16, 2014 at 4:07 PM, Maxim Dounin <[email protected]> wrote: > Hello! > > 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 > 'current' > > 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 > http://nginx.org/ > > _______________________________________________ > nginx-devel mailing list > [email protected] > http://mailman.nginx.org/mailman/listinfo/nginx-devel > -- Ravi
_______________________________________________ nginx-devel mailing list [email protected] http://mailman.nginx.org/mailman/listinfo/nginx-devel
