Re: ngx_array.c allocation question

2015-10-28 Thread Joel Cunningham
___ nginx-devel mailing list [email protected] http://mailman.nginx.org/mailman/listinfo/nginx-devel

Re: ngx_array.c allocation question

2015-10-28 Thread Valentin V. Bartenev
On Wednesday 28 October 2015 15:24:39 Lev Brouk wrote: > Valentin and Joel, > It would appear that a part of Joel's (and my own) concern could be > alleviated if ngx_array_push called ngx_pfree on the old memory block after > it grew it in > https://github.com/nginx/nginx/blob/master/src/core/ng

Re: ngx_array.c allocation question

2015-10-28 Thread Lev Brouk
Valentin and Joel, It would appear that a part of Joel's (and my own) concern could be alleviated if ngx_array_push called ngx_pfree on the old memory block after it grew it inĀ  https://github.com/nginx/nginx/blob/master/src/core/ngx_array.c#L76. I understand that (a) doing this would still leak

Re: ngx_array.c allocation question

2015-10-28 Thread Valentin V. Bartenev
On Tuesday 27 October 2015 22:51:53 Joel Cunningham wrote: > Request pools seem short lived, but the cycle pool sticks around for a long > time. > > I'm working on a custom module that has state which should persist the entire > uptime of NGINX. I was going to use an array allocated out of the

Re: ngx_array.c allocation question

2015-10-27 Thread Joel Cunningham
___ nginx-devel mailing list [email protected] http://mailman.nginx.org/mailman/listinfo/nginx-devel

Re: ngx_array.c allocation question

2015-10-27 Thread Valentin V. Bartenev
On Tuesday 27 October 2015 20:52:43 Joel Cunningham wrote: > Hi, > > I'm fairly new to the NGINX sources and have been studying ngx_array.c (from 1.9.5), particularly how the array grows when full. > > I'm having some confusion about how pool memory isn't leaked when the new array size can not

ngx_array.c allocation question

2015-10-27 Thread Joel Cunningham
___ nginx-devel mailing list [email protected] http://mailman.nginx.org/mailman/listinfo/nginx-devel