aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_buf.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2005-04-08 15:18:55 +0000
committerIgor Sysoev <igor@sysoev.ru>2005-04-08 15:18:55 +0000
commit02f742b45eb8792053d3880641f45651d645e351 (patch)
tree1d5893bcc89c8f879712aa80f9a98a42f397e2c0 /src/core/ngx_buf.c
parent87ff72436d289ae7b72a23138262e6d156490927 (diff)
downloadnginx-release-0.1.28.tar.gz
nginx-release-0.1.28.zip
nginx-0.1.28-RELEASE importrelease-0.1.28
*) Bugfix: nginx hogs CPU while proxying the huge files. *) Bugfix: nginx could not be built by gcc 4.0 on Linux.
Diffstat (limited to 'src/core/ngx_buf.c')
-rw-r--r--src/core/ngx_buf.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/core/ngx_buf.c b/src/core/ngx_buf.c
index 2f0356ffd..4c1b1d5ac 100644
--- a/src/core/ngx_buf.c
+++ b/src/core/ngx_buf.c
@@ -44,6 +44,27 @@ ngx_create_temp_buf(ngx_pool_t *pool, size_t size)
ngx_chain_t *
+ngx_alloc_chain_link(ngx_pool_t *pool)
+{
+ ngx_chain_t *cl;
+
+ cl = pool->chain;
+
+ if (cl) {
+ pool->chain = cl->next;
+ return cl;
+ }
+
+ cl = ngx_palloc(pool, sizeof(ngx_chain_t));
+ if (cl == NULL) {
+ return NULL;
+ }
+
+ return cl;
+}
+
+
+ngx_chain_t *
ngx_create_chain_of_bufs(ngx_pool_t *pool, ngx_bufs_t *bufs)
{
u_char *p;