Mercurial > hg > nginx-vendor-0-7
annotate src/core/ngx_palloc.h @ 366:babd3d9efb62 NGINX_0_6_27
nginx 0.6.27
*) Change: now by default the rtsig method is not built on
Linux 2.6.18+.
*) Change: now a request method is not changed while redirection to a
named location via an "error_page" directive.
*) Feature: the "resolver" and "resolver_timeout" directives in SMTP
proxy.
*) Feature: the "post_action" directive supports named locations.
*) Bugfix: a segmentation fault occurred in worker process, if a
request was redirected from proxy, FastCGI, or memcached location to
static named locations.
*) Bugfix: browsers did not repeat SSL handshake if there is no valid
client certificate in first handshake.
Thanks to Alexander V. Inyukhin.
*) Bugfix: if response code 495-497 was redirected via an "error_page"
directive without code change, then nginx tried to allocate too many
memory.
*) Bugfix: memory leak in long-lived non buffered connections.
*) Bugfix: memory leak in resolver.
*) Bugfix: a segmentation fault occurred in worker process, if a
request was redirected from proxy, FastCGI, or memcached location to
static named locations.
*) Bugfix: in the $proxy_host and $proxy_port variables caching.
Thanks to Sergey Bochenkov.
*) Bugfix: a "proxy_pass" directive with variables used incorrectly the
same port as in another "proxy_pass" directive with the same host
name and without variables.
Thanks to Sergey Bochenkov.
*) Bugfix: an alert "sendmsg() failed (9: Bad file descriptor)" on some
64-bit platforms while reconfiguration.
*) Bugfix: a segmentation fault occurred in worker process, if empty
stub block was used second time in SSI.
*) Bugfix: in copying URI part contained escaped symbols into arguments.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 12 Mar 2008 00:00:00 +0300 |
parents | cba14c1e2a4b |
children | bc21d9cd9c54 |
rev | line source |
---|---|
0 | 1 |
2 /* | |
3 * Copyright (C) Igor Sysoev | |
4 */ | |
5 | |
6 | |
7 #ifndef _NGX_PALLOC_H_INCLUDED_ | |
8 #define _NGX_PALLOC_H_INCLUDED_ | |
9 | |
10 | |
11 #include <ngx_config.h> | |
12 #include <ngx_core.h> | |
13 | |
14 | |
15 /* | |
138 | 16 * NGX_MAX_ALLOC_FROM_POOL should be (ngx_pagesize - 1), i.e. 4095 on x86. |
0 | 17 * On FreeBSD 5.x it allows to use the zero copy sending. |
18 * On Windows NT it decreases a number of locked pages in a kernel. | |
19 */ | |
20 #define NGX_MAX_ALLOC_FROM_POOL (ngx_pagesize - 1) | |
21 | |
300 | 22 #define NGX_DEFAULT_POOL_SIZE (16 * 1024) |
23 #define NGX_MIN_POOL_SIZE \ | |
24 (sizeof(ngx_pool_t) + 2 * sizeof(ngx_pool_large_t)) | |
0 | 25 |
26 | |
58 | 27 typedef void (*ngx_pool_cleanup_pt)(void *data); |
28 | |
29 typedef struct ngx_pool_cleanup_s ngx_pool_cleanup_t; | |
30 | |
31 struct ngx_pool_cleanup_s { | |
32 ngx_pool_cleanup_pt handler; | |
33 void *data; | |
34 ngx_pool_cleanup_t *next; | |
35 }; | |
36 | |
37 | |
0 | 38 typedef struct ngx_pool_large_s ngx_pool_large_t; |
39 | |
40 struct ngx_pool_large_s { | |
58 | 41 ngx_pool_large_t *next; |
42 void *alloc; | |
0 | 43 }; |
44 | |
45 | |
46 struct ngx_pool_s { | |
58 | 47 u_char *last; |
48 u_char *end; | |
130 | 49 ngx_pool_t *current; |
58 | 50 ngx_chain_t *chain; |
51 ngx_pool_t *next; | |
52 ngx_pool_large_t *large; | |
53 ngx_pool_cleanup_t *cleanup; | |
54 ngx_log_t *log; | |
0 | 55 }; |
56 | |
57 | |
58 | 58 typedef struct { |
59 ngx_fd_t fd; | |
60 u_char *name; | |
61 ngx_log_t *log; | |
62 } ngx_pool_cleanup_file_t; | |
63 | |
64 | |
0 | 65 void *ngx_alloc(size_t size, ngx_log_t *log); |
66 void *ngx_calloc(size_t size, ngx_log_t *log); | |
67 | |
68 ngx_pool_t *ngx_create_pool(size_t size, ngx_log_t *log); | |
69 void ngx_destroy_pool(ngx_pool_t *pool); | |
70 | |
71 void *ngx_palloc(ngx_pool_t *pool, size_t size); | |
72 void *ngx_pcalloc(ngx_pool_t *pool, size_t size); | |
73 ngx_int_t ngx_pfree(ngx_pool_t *pool, void *p); | |
74 | |
75 | |
112 | 76 ngx_pool_cleanup_t *ngx_pool_cleanup_add(ngx_pool_t *p, size_t size); |
58 | 77 void ngx_pool_cleanup_file(void *data); |
278 | 78 void ngx_pool_delete_file(void *data); |
58 | 79 |
80 | |
0 | 81 #endif /* _NGX_PALLOC_H_INCLUDED_ */ |