annotate src/core/ngx_slab.h @ 258:6ae1357b7b7c NGINX_0_4_14

nginx 0.4.14 *) Feature: the "proxy_pass_error_message" directive in IMAP/POP3 proxy. *) Feature: now configure detects system PCRE library on FreeBSD, Linux, and NetBSD. *) Bugfix: ngx_http_perl_module did not work with perl built with the threads support; bug appeared in 0.3.38. *) Bugfix: ngx_http_perl_module did not work if perl was called recursively. *) Bugfix: nginx ignored a host name in an request line. *) Bugfix: a worker process may got caught in an endless loop, if a FastCGI server sent too many data to the stderr. *) Bugfix: the $upstream_response_time variable may be negative if the system time was changed backward. *) Bugfix: the "Auth-Login-Attempt" parameter was not sent to IMAP/POP3 proxy authentication server when POP3 was used. *) Bugfix: a segmentation fault might occur if connect to IMAP/POP3 proxy authentication server failed.
author Igor Sysoev <http://sysoev.ru>
date Mon, 27 Nov 2006 00:00:00 +0300
parents
children 29a6403156b0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
258
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
1
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
2 /*
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
3 * Copyright (C) Igor Sysoev
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
4 */
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
5
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
6
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
7 #ifndef _NGX_SLAB_H_INCLUDED_
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
8 #define _NGX_SLAB_H_INCLUDED_
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
9
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
10
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
11 #include <ngx_config.h>
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
12 #include <ngx_core.h>
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
13
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
14
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
15 typedef struct ngx_slab_page_s ngx_slab_page_t;
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
16
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
17 struct ngx_slab_page_s {
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
18 uintptr_t slab;
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
19 ngx_slab_page_t *next;
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
20 uintptr_t prev;
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
21 };
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
22
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
23
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
24 typedef struct {
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
25 ngx_atomic_t lock;
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
26
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
27 size_t min_size;
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
28 size_t min_shift;
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
29
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
30 ngx_slab_page_t *pages;
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
31 ngx_slab_page_t free;
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
32
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
33 u_char *start;
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
34 u_char *end;
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
35
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
36 ngx_shmtx_t mutex;
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
37 } ngx_slab_pool_t;
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
38
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
39
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
40 void ngx_slab_init(ngx_slab_pool_t *pool);
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
41 void *ngx_slab_alloc(ngx_slab_pool_t *pool, size_t size);
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
42 void ngx_slab_free(ngx_slab_pool_t *pool, void *p);
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
43
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
44
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
45 #endif /* _NGX_SLAB_H_INCLUDED_ */