Mercurial > hg > nginx-vendor-0-6
annotate src/core/ngx_palloc.h @ 326:9fc4ab6673f9 NGINX_0_6_7
nginx 0.6.7
*) Change: now the paths specified in the "include",
"auth_basic_user_file", "perl_modules", "ssl_certificate",
"ssl_certificate_key", and "ssl_client_certificate" directives are
relative to directory of nginx configuration file nginx.conf, but
not to nginx prefix directory.
*) Change: the --sysconfdir=PATH option in configure was canceled.
*) Change: the special make target "upgrade1" was defined for online
upgrade of 0.1.x versions.
*) Feature: the "server_name" and "valid_referers" directives support
regular expressions.
*) Feature: the "server" directive in the "upstream" context supports
the "backup" parameter.
*) Feature: the ngx_http_perl_module supports the
$r->discard_request_body.
*) Feature: the "add_header Last-Modified ..." directive changes the
"Last-Modified" response header line.
*) Bugfix: if an response different than 200 was returned to an request
with body and connection went to the keep-alive state after the
request, then nginx returned 400 for the next request.
*) Bugfix: a segmentation fault occurred in worker process if invalid
address was set in the "auth_http" directive.
*) Bugfix: now nginx uses default listen backlog value 511 on all
platforms except FreeBSD.
Thanks to Jiang Hong.
*) Bugfix: a worker process may got caught in an endless loop, if an
"server" inside "upstream" block was marked as "down"; bug appeared
in 0.6.6.
*) Bugfix: now Solaris sendfilev() is not used to transfer the client
request body to FastCGI-server via the unix domain socket.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 15 Aug 2007 00:00:00 +0400 |
parents | cba14c1e2a4b |
children |
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_ */ |