annotate src/os/unix/ngx_alloc.h @ 660:d0f7a625f27c NGINX_1_1_14

nginx 1.1.14 *) Feature: multiple "limit_req" limits may be used simultaneously. *) Bugfix: in error handling while connecting to a backend. Thanks to Piotr Sikora. *) Bugfix: in AIO error handling on FreeBSD. *) Bugfix: in the OpenSSL library initialization. *) Bugfix: the "proxy_redirect" directives might not be correctly inherited. *) Bugfix: memory leak during reconfiguration if the "pcre_jit" directive was used.
author Igor Sysoev <http://sysoev.ru>
date Mon, 30 Jan 2012 00:00:00 +0400
parents 0b6053502c55
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
1
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
2 /*
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
3 * Copyright (C) Igor Sysoev
660
d0f7a625f27c nginx 1.1.14
Igor Sysoev <http://sysoev.ru>
parents: 390
diff changeset
4 * Copyright (C) Nginx, Inc.
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
5 */
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
6
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
7
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
8 #ifndef _NGX_ALLOC_H_INCLUDED_
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
9 #define _NGX_ALLOC_H_INCLUDED_
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
10
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
11
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
12 #include <ngx_config.h>
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
13 #include <ngx_core.h>
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
14
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
15
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
16 void *ngx_alloc(size_t size, ngx_log_t *log);
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
17 void *ngx_calloc(size_t size, ngx_log_t *log);
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
18
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
19 #define ngx_free free
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
20
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
21
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
22 /*
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
23 * Linux has memalign() or posix_memalign()
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
24 * Solaris has memalign()
390
0b6053502c55 nginx 0.7.7
Igor Sysoev <http://sysoev.ru>
parents: 258
diff changeset
25 * FreeBSD 7.0 has posix_memalign(), besides, early version's malloc()
0b6053502c55 nginx 0.7.7
Igor Sysoev <http://sysoev.ru>
parents: 258
diff changeset
26 * aligns allocations bigger than page size at the page boundary
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
27 */
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
28
18
6f8b0dc0f8dd nginx 0.1.9
Igor Sysoev <http://sysoev.ru>
parents: 0
diff changeset
29 #if (NGX_HAVE_POSIX_MEMALIGN || NGX_HAVE_MEMALIGN)
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
30
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
31 void *ngx_memalign(size_t alignment, size_t size, ngx_log_t *log);
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
32
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
33 #else
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
34
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
35 #define ngx_memalign(alignment, size, log) ngx_alloc(size, log)
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
36
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
37 #endif
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
38
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
39
258
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents: 138
diff changeset
40 extern ngx_uint_t ngx_pagesize;
6ae1357b7b7c nginx 0.4.14
Igor Sysoev <http://sysoev.ru>
parents: 138
diff changeset
41 extern ngx_uint_t ngx_pagesize_shift;
138
8e6d4d96ec4c nginx 0.3.16
Igor Sysoev <http://sysoev.ru>
parents: 18
diff changeset
42 extern ngx_uint_t ngx_cacheline_size;
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
43
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
44
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
45 #endif /* _NGX_ALLOC_H_INCLUDED_ */