comparison src/core/ngx_palloc.c @ 302:9b7db0df50f0 NGINX_0_5_21

nginx 0.5.21 *) Bugfix: if server has more than about ten locations, then regex locations might be choosen not in that order as they were specified. *) Bugfix: a worker process may got caught in an endless loop on 64-bit platform, if the 33-rd or next in succession backend has failed. Thanks to Anton Povarov. *) Bugfix: a bus error might occur on Solaris/sparc64 if the PCRE library was used. Thanks to Andrei Nigmatulin. *) Bugfix: in the HTTPS protocol in the "proxy_pass" directive.
author Igor Sysoev <http://sysoev.ru>
date Mon, 28 May 2007 00:00:00 +0400
parents 704622b2528a
children 3021f899881a
comparison
equal deleted inserted replaced
301:a025840de07d 302:9b7db0df50f0
95 p = pool->current; 95 p = pool->current;
96 current = p; 96 current = p;
97 97
98 for ( ;; ) { 98 for ( ;; ) {
99 99
100 #if (NGX_HAVE_NONALIGNED)
101
102 /*
103 * allow non-aligned memory blocks for small allocations (1, 2,
104 * or 3 bytes) and for odd length strings (struct's have aligned
105 * size)
106 */
107
100 if (size < sizeof(int) || (size & 1)) { 108 if (size < sizeof(int) || (size & 1)) {
101 m = p->last; 109 m = p->last;
102 110
103 } else { 111 } else
112 #endif
113
114 {
104 m = ngx_align_ptr(p->last, NGX_ALIGNMENT); 115 m = ngx_align_ptr(p->last, NGX_ALIGNMENT);
105 } 116 }
106 117
107 if ((size_t) (p->end - m) >= size) { 118 if ((size_t) (p->end - m) >= size) {
108 p->last = m + size; 119 p->last = m + size;