comparison src/core/ngx_palloc.c @ 2057:24eebb21b5d2

fix max size allocated from pool
author Igor Sysoev <igor@sysoev.ru>
date Sat, 21 Jun 2008 06:40:32 +0000
parents 3ea9a03a1803
children 25add486e7aa
comparison
equal deleted inserted replaced
2056:3ea9a03a1803 2057:24eebb21b5d2
24 24
25 p->d.last = (u_char *) p + sizeof(ngx_pool_t); 25 p->d.last = (u_char *) p + sizeof(ngx_pool_t);
26 p->d.end = (u_char *) p + size; 26 p->d.end = (u_char *) p + size;
27 p->d.next = NULL; 27 p->d.next = NULL;
28 28
29 p->max = (size < NGX_MAX_ALLOC_FROM_POOL) ? size - sizeof(ngx_pool_t): 29 size = size - sizeof(ngx_pool_t);
30 NGX_MAX_ALLOC_FROM_POOL; 30 p->max = (size < NGX_MAX_ALLOC_FROM_POOL) ? size : NGX_MAX_ALLOC_FROM_POOL;
31
31 p->current = p; 32 p->current = p;
32 p->chain = NULL; 33 p->chain = NULL;
33 p->large = NULL; 34 p->large = NULL;
34 p->cleanup = NULL; 35 p->cleanup = NULL;
35 p->log = log; 36 p->log = log;