comparison src/core/ngx_palloc.c @ 546:e19e5f542878 NGINX_0_8_25

nginx 0.8.25 *) Change: now no message is written in an error log if a variable is not found by $r->variable() method. *) Feature: the ngx_http_degradation_module. *) Feature: regular expression named captures. *) Feature: now URI part is not required a "proxy_pass" directive if variables are used. *) Feature: now the "msie_padding" directive works for Chrome too. *) Bugfix: a segmentation fault occurred in a worker process on low memory condition; the bug had appeared in 0.8.18. *) Bugfix: nginx sent gzipped responses to clients those do not support gzip, if "gzip_static on" and "gzip_vary off"; the bug had appeared in 0.8.16.
author Igor Sysoev <http://sysoev.ru>
date Mon, 16 Nov 2009 00:00:00 +0300
parents f7ec98e3caeb
children 2da4537168f8
comparison
equal deleted inserted replaced
545:91e4b06e1a01 546:e19e5f542878
15 ngx_pool_t * 15 ngx_pool_t *
16 ngx_create_pool(size_t size, ngx_log_t *log) 16 ngx_create_pool(size_t size, ngx_log_t *log)
17 { 17 {
18 ngx_pool_t *p; 18 ngx_pool_t *p;
19 19
20 p = ngx_memalign(ngx_pagesize, size, log); 20 p = ngx_memalign(ngx_min(ngx_pagesize, size), size, log);
21 if (p == NULL) { 21 if (p == NULL) {
22 return NULL; 22 return NULL;
23 } 23 }
24 24
25 p->d.last = (u_char *) p + sizeof(ngx_pool_t); 25 p->d.last = (u_char *) p + sizeof(ngx_pool_t);
179 size_t psize; 179 size_t psize;
180 ngx_pool_t *p, *new, *current; 180 ngx_pool_t *p, *new, *current;
181 181
182 psize = (size_t) (pool->d.end - (u_char *) pool); 182 psize = (size_t) (pool->d.end - (u_char *) pool);
183 183
184 m = ngx_memalign(ngx_pagesize, psize, pool->log); 184 m = ngx_memalign(ngx_min(ngx_pagesize, psize), psize, pool->log);
185 if (m == NULL) { 185 if (m == NULL) {
186 return NULL; 186 return NULL;
187 } 187 }
188 188
189 new = (ngx_pool_t *) m; 189 new = (ngx_pool_t *) m;
217 { 217 {
218 void *p; 218 void *p;
219 ngx_uint_t n; 219 ngx_uint_t n;
220 ngx_pool_large_t *large; 220 ngx_pool_large_t *large;
221 221
222 p = ngx_memalign(ngx_pagesize, size, pool->log); 222 p = ngx_alloc(size, pool->log);
223 if (p == NULL) { 223 if (p == NULL) {
224 return NULL; 224 return NULL;
225 } 225 }
226 226
227 n = 0; 227 n = 0;