comparison 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
comparison
equal deleted inserted replaced
257:0e566ee1bcd5 258:6ae1357b7b7c
1
2 /*
3 * Copyright (C) Igor Sysoev
4 */
5
6
7 #ifndef _NGX_SLAB_H_INCLUDED_
8 #define _NGX_SLAB_H_INCLUDED_
9
10
11 #include <ngx_config.h>
12 #include <ngx_core.h>
13
14
15 typedef struct ngx_slab_page_s ngx_slab_page_t;
16
17 struct ngx_slab_page_s {
18 uintptr_t slab;
19 ngx_slab_page_t *next;
20 uintptr_t prev;
21 };
22
23
24 typedef struct {
25 ngx_atomic_t lock;
26
27 size_t min_size;
28 size_t min_shift;
29
30 ngx_slab_page_t *pages;
31 ngx_slab_page_t free;
32
33 u_char *start;
34 u_char *end;
35
36 ngx_shmtx_t mutex;
37 } ngx_slab_pool_t;
38
39
40 void ngx_slab_init(ngx_slab_pool_t *pool);
41 void *ngx_slab_alloc(ngx_slab_pool_t *pool, size_t size);
42 void ngx_slab_free(ngx_slab_pool_t *pool, void *p);
43
44
45 #endif /* _NGX_SLAB_H_INCLUDED_ */