comparison src/http/modules/ngx_http_gzip_filter_module.c @ 4114:5db098f97e0e

API change: ngx_chain_update_chains() now requires pool. The ngx_chain_update_chains() needs pool to free chain links used for buffers with non-matching tags. Providing one helps to reduce memory consumption for long-lived requests.
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 15 Sep 2011 16:03:17 +0000
parents a08e8b3832ae
children d620f497c50f
comparison
equal deleted inserted replaced
4113:a28ba1cdec27 4114:5db098f97e0e
376 goto failed; 376 goto failed;
377 } 377 }
378 378
379 cl = NULL; 379 cl = NULL;
380 380
381 ngx_chain_update_chains(&ctx->free, &ctx->busy, &cl, 381 ngx_chain_update_chains(r->pool, &ctx->free, &ctx->busy, &cl,
382 (ngx_buf_tag_t) &ngx_http_gzip_filter_module); 382 (ngx_buf_tag_t) &ngx_http_gzip_filter_module);
383 ctx->nomem = 0; 383 ctx->nomem = 0;
384 } 384 }
385 385
386 for ( ;; ) { 386 for ( ;; ) {
446 goto failed; 446 goto failed;
447 } 447 }
448 448
449 ngx_http_gzip_filter_free_copy_buf(r, ctx); 449 ngx_http_gzip_filter_free_copy_buf(r, ctx);
450 450
451 ngx_chain_update_chains(&ctx->free, &ctx->busy, &ctx->out, 451 ngx_chain_update_chains(r->pool, &ctx->free, &ctx->busy, &ctx->out,
452 (ngx_buf_tag_t) &ngx_http_gzip_filter_module); 452 (ngx_buf_tag_t) &ngx_http_gzip_filter_module);
453 ctx->last_out = &ctx->out; 453 ctx->last_out = &ctx->out;
454 454
455 ctx->nomem = 0; 455 ctx->nomem = 0;
456 456