diff options
| author | Maxim Dounin <mdounin@mdounin.ru> | 2011-09-15 16:03:17 +0000 |
|---|---|---|
| committer | Maxim Dounin <mdounin@mdounin.ru> | 2011-09-15 16:03:17 +0000 |
| commit | d7c2673d3ffb5c8c7c994a3ee385997237ed0d99 (patch) | |
| tree | 76ddc7f172a5ca4163110f259e38e30da4521ee6 /src/http | |
| parent | a890b313f34bdcd6f95e40c75084f6ea5dd8a53c (diff) | |
| download | nginx-d7c2673d3ffb5c8c7c994a3ee385997237ed0d99.tar.gz nginx-d7c2673d3ffb5c8c7c994a3ee385997237ed0d99.tar.bz2 | |
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.
Diffstat (limited to 'src/http')
| -rw-r--r-- | src/http/modules/ngx_http_chunked_filter_module.c | 2 | ||||
| -rw-r--r-- | src/http/modules/ngx_http_gzip_filter_module.c | 4 | ||||
| -rw-r--r-- | src/http/ngx_http_upstream.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/http/modules/ngx_http_chunked_filter_module.c b/src/http/modules/ngx_http_chunked_filter_module.c index ee152288c..e42f3b526 100644 --- a/src/http/modules/ngx_http_chunked_filter_module.c +++ b/src/http/modules/ngx_http_chunked_filter_module.c @@ -221,7 +221,7 @@ ngx_http_chunked_body_filter(ngx_http_request_t *r, ngx_chain_t *in) rc = ngx_http_next_body_filter(r, out); - ngx_chain_update_chains(&ctx->free, &ctx->busy, &out, + ngx_chain_update_chains(r->pool, &ctx->free, &ctx->busy, &out, (ngx_buf_tag_t) &ngx_http_chunked_filter_module); return rc; diff --git a/src/http/modules/ngx_http_gzip_filter_module.c b/src/http/modules/ngx_http_gzip_filter_module.c index d624e36ff..18824059a 100644 --- a/src/http/modules/ngx_http_gzip_filter_module.c +++ b/src/http/modules/ngx_http_gzip_filter_module.c @@ -378,7 +378,7 @@ ngx_http_gzip_body_filter(ngx_http_request_t *r, ngx_chain_t *in) cl = NULL; - ngx_chain_update_chains(&ctx->free, &ctx->busy, &cl, + ngx_chain_update_chains(r->pool, &ctx->free, &ctx->busy, &cl, (ngx_buf_tag_t) &ngx_http_gzip_filter_module); ctx->nomem = 0; } @@ -448,7 +448,7 @@ ngx_http_gzip_body_filter(ngx_http_request_t *r, ngx_chain_t *in) ngx_http_gzip_filter_free_copy_buf(r, ctx); - ngx_chain_update_chains(&ctx->free, &ctx->busy, &ctx->out, + ngx_chain_update_chains(r->pool, &ctx->free, &ctx->busy, &ctx->out, (ngx_buf_tag_t) &ngx_http_gzip_filter_module); ctx->last_out = &ctx->out; diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index 29432dc14..f698833af 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -2382,7 +2382,7 @@ ngx_http_upstream_process_non_buffered_request(ngx_http_request_t *r, return; } - ngx_chain_update_chains(&u->free_bufs, &u->busy_bufs, + ngx_chain_update_chains(r->pool, &u->free_bufs, &u->busy_bufs, &u->out_bufs, u->output.tag); } |
