Klaus Demo nginx / 5a4c616
small optimization Igor Sysoev 13 years ago
1 changed file(s) with 7 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
153153 ngx_palloc_block(ngx_pool_t *pool, size_t size)
154154 {
155155 u_char *m;
156 size_t psize;
156157 ngx_pool_t *p, *new, *current;
157158
158 new = ngx_create_pool((size_t) (pool->d.end - (u_char *) pool), pool->log);
159 psize = (size_t) (pool->d.end - (u_char *) pool);
160
161 new = ngx_alloc(size, pool->log);
159162 if (new == NULL) {
160163 return NULL;
161164 }
165
166 new->d.end = (u_char *) new + psize;
167 new->d.next = NULL;
162168
163169 current = pool->current;
164170