diff options
author | Igor Sysoev <igor@sysoev.ru> | 2008-06-21 06:40:32 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2008-06-21 06:40:32 +0000 |
commit | 3cc03616e905dae623a11a75b163d7722eb065cd (patch) | |
tree | 0bae5e01e936665521b690e9fe4167fe75076d1e /src/core/ngx_palloc.c | |
parent | 11864a706a6b109ec462d3d6be7413713de88846 (diff) | |
download | nginx-3cc03616e905dae623a11a75b163d7722eb065cd.tar.gz nginx-3cc03616e905dae623a11a75b163d7722eb065cd.zip |
fix max size allocated from pool
Diffstat (limited to 'src/core/ngx_palloc.c')
-rw-r--r-- | src/core/ngx_palloc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/ngx_palloc.c b/src/core/ngx_palloc.c index 971887fd4..5a0ea5121 100644 --- a/src/core/ngx_palloc.c +++ b/src/core/ngx_palloc.c @@ -26,8 +26,9 @@ ngx_create_pool(size_t size, ngx_log_t *log) p->d.end = (u_char *) p + size; p->d.next = NULL; - p->max = (size < NGX_MAX_ALLOC_FROM_POOL) ? size - sizeof(ngx_pool_t): - NGX_MAX_ALLOC_FROM_POOL; + size = size - sizeof(ngx_pool_t); + p->max = (size < NGX_MAX_ALLOC_FROM_POOL) ? size : NGX_MAX_ALLOC_FROM_POOL; + p->current = p; p->chain = NULL; p->large = NULL; |