Mercurial > hg > nginx-vendor-0-8
comparison src/core/ngx_palloc.c @ 2:cc9f381affaa NGINX_0_1_1
nginx 0.1.1
*) Feature: the gzip_types directive.
*) Feature: the tcp_nodelay directive.
*) Feature: the send_lowat directive is working not only on OSes that
support kqueue NOTE_LOWAT, but also on OSes that support SO_SNDLOWAT.
*) Feature: the setproctitle() emulation for Linux and Solaris.
*) Bugfix: the "Location" header rewrite bug fixed while the proxying.
*) Bugfix: the ngx_http_chunked_module module may get caught in an
endless loop.
*) Bugfix: the /dev/poll module bugs fixed.
*) Bugfix: the responses were corrupted when the temporary files were
used while the proxying.
*) Bugfix: the unescaped requests were passed to the backend.
*) Bugfix: while the build configuration on Linux 2.4 the
--with-poll_module parameter was required.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 11 Oct 2004 00:00:00 +0400 |
parents | f0b350454894 |
children | 46833bd150cb |
comparison
equal
deleted
inserted
replaced
1:80bdda0151b0 | 2:cc9f381affaa |
---|---|
75 char *m; | 75 char *m; |
76 ngx_pool_t *p, *n; | 76 ngx_pool_t *p, *n; |
77 ngx_pool_large_t *large, *last; | 77 ngx_pool_large_t *large, *last; |
78 | 78 |
79 if (size <= (size_t) NGX_MAX_ALLOC_FROM_POOL | 79 if (size <= (size_t) NGX_MAX_ALLOC_FROM_POOL |
80 && size <= (size_t) (pool->end - (char *) pool) - sizeof(ngx_pool_t)) | 80 && size <= (size_t) (pool->end - (char *) pool) |
81 - (size_t) ngx_align(sizeof(ngx_pool_t))) | |
81 { | 82 { |
82 for (p = pool, n = pool->next; /* void */; p = n, n = n->next) { | 83 for (p = pool, n = pool->next; /* void */; p = n, n = n->next) { |
83 m = ngx_align(p->last); | 84 m = ngx_align(p->last); |
84 | 85 |
85 if ((size_t) (p->end - m) >= size) { | 86 if ((size_t) (p->end - m) >= size) { |
86 p->last = m + size ; | 87 p->last = m + size; |
87 | 88 |
88 return m; | 89 return m; |
89 } | 90 } |
90 | 91 |
91 if (n == NULL) { | 92 if (n == NULL) { |
98 if (!(n = ngx_create_pool((size_t) (p->end - (char *) p), p->log))) { | 99 if (!(n = ngx_create_pool((size_t) (p->end - (char *) p), p->log))) { |
99 return NULL; | 100 return NULL; |
100 } | 101 } |
101 | 102 |
102 p->next = n; | 103 p->next = n; |
103 m = n->last; | 104 m = ngx_align(n->last); |
104 n->last += size; | 105 n->last = m + size; |
105 | 106 |
106 return m; | 107 return m; |
107 } | 108 } |
108 | 109 |
109 /* allocate a large block */ | 110 /* allocate a large block */ |