make ngx_pool clear2
Maxim Dounin
mdounin at mdounin.ru
Tue Jun 4 10:18:32 UTC 2019
Hello!
On Tue, Jun 04, 2019 at 04:38:21PM +0800, liuyujun wrote:
> hello. everybody here?
>
> example before:
> for (p = pool; p; p = p->d.next) {
> p->d.last = (u_char *) p + sizeof(ngx_pool_t);
> p->d.failed = 0;
> }
>
>
>
>
> after:
> for (p = &pool->d; p; p = p->next) {
> if (p == &pool->d) {
> p->last = (u_char *) p + sizeof(ngx_pool_t);
> } else {
> p->last = (u_char *) p + sizeof(ngx_pool_data_t);
> }
> p->failed = 0;
> }
https://trac.nginx.org/nginx/ticket/1594
[...]
--
Maxim Dounin
http://mdounin.ru/
More information about the nginx
mailing list