Mercurial > hg > nginx-vendor-0-6
comparison src/os/unix/ngx_alloc.c @ 10:46833bd150cb NGINX_0_1_5
nginx 0.1.5
*) Bugfix: on Solaris and Linux there may be too many "recvmsg()
returned not enough data" alerts.
*) Bugfix: there were the "writev() failed (22: Invalid argument)"
errors on Solaris in proxy mode without sendfile. On other platforms
that do not support sendfile at all the process got caught in an
endless loop.
*) Bugfix: segmentation fault on Solaris in proxy mode and using
sendfile.
*) Bugfix: segmentation fault on Solaris.
*) Bugfix: on-line upgrade did not work on Linux.
*) Bugfix: the ngx_http_autoindex_module module did not escape the
spaces, the quotes, and the percent signs in the directory listing.
*) Change: the decrease of the copy operations.
*) Feature: the userid_p3p directive.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Thu, 11 Nov 2004 00:00:00 +0300 |
parents | f0b350454894 |
children | 6f8b0dc0f8dd |
comparison
equal
deleted
inserted
replaced
9:77eee314ddbd | 10:46833bd150cb |
---|---|
15 { | 15 { |
16 void *p; | 16 void *p; |
17 | 17 |
18 if (!(p = malloc(size))) { | 18 if (!(p = malloc(size))) { |
19 ngx_log_error(NGX_LOG_EMERG, log, ngx_errno, | 19 ngx_log_error(NGX_LOG_EMERG, log, ngx_errno, |
20 "malloc() " SIZE_T_FMT " bytes failed", size); | 20 "malloc() %uz bytes failed", size); |
21 } | 21 } |
22 | 22 |
23 ngx_log_debug2(NGX_LOG_DEBUG_ALLOC, log, 0, | 23 ngx_log_debug2(NGX_LOG_DEBUG_ALLOC, log, 0, "malloc: %p:%uz", p, size); |
24 "malloc: " PTR_FMT ":" SIZE_T_FMT, p, size); | |
25 | 24 |
26 return p; | 25 return p; |
27 } | 26 } |
28 | 27 |
29 | 28 |
47 { | 46 { |
48 void *p; | 47 void *p; |
49 | 48 |
50 if (posix_memalign(&p, alignment, size) == -1) { | 49 if (posix_memalign(&p, alignment, size) == -1) { |
51 ngx_log_error(NGX_LOG_EMERG, log, ngx_errno, | 50 ngx_log_error(NGX_LOG_EMERG, log, ngx_errno, |
52 "posix_memalign() " SIZE_T_FMT " bytes aligned to " | 51 "posix_memalign() %uz bytes aligned to %uz failed", |
53 SIZE_T_FMT " failed", size, alignment); | 52 size, alignment); |
54 } | 53 } |
55 | 54 |
56 ngx_log_debug2(NGX_LOG_DEBUG_ALLOC, log, 0, | 55 ngx_log_debug2(NGX_LOG_DEBUG_ALLOC, log, 0, |
57 "posix_memalign: " PTR_FMT ":" SIZE_T_FMT, p, size); | 56 "posix_memalign: %p:%uz", p, size); |
58 | 57 |
59 return p; | 58 return p; |
60 } | 59 } |
61 | 60 |
62 #elif (HAVE_MEMALIGN) | 61 #elif (HAVE_MEMALIGN) |
65 { | 64 { |
66 void *p; | 65 void *p; |
67 | 66 |
68 if (!(p = memalign(alignment, size))) { | 67 if (!(p = memalign(alignment, size))) { |
69 ngx_log_error(NGX_LOG_EMERG, log, ngx_errno, | 68 ngx_log_error(NGX_LOG_EMERG, log, ngx_errno, |
70 "memalign() " SIZE_T_FMT " bytes aligned to " | 69 "memalign() %uz bytes aligned to %uz failed", |
71 SIZE_T_FMT " failed", size, alignment); | 70 size, alignment); |
72 } | 71 } |
73 | 72 |
74 ngx_log_debug2(NGX_LOG_DEBUG_ALLOC, log, 0, | 73 ngx_log_debug2(NGX_LOG_DEBUG_ALLOC, log, 0, |
75 "memalign: " PTR_FMT ":" SIZE_T_FMT, p, size); | 74 "memalign: %p:%uz", p, size); |
76 | 75 |
77 return p; | 76 return p; |
78 } | 77 } |
79 | 78 |
80 #endif | 79 #endif |