Mercurial > hg > nginx-quic
changeset 3321:93e8daca5dbb
update allocation error messages
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sun, 15 Nov 2009 09:03:08 +0000 |
parents | d4ad1b0b6c8d |
children | e19df6e65352 |
files | src/os/unix/ngx_alloc.c src/os/win32/ngx_alloc.c |
diffstat | 2 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/os/unix/ngx_alloc.c +++ b/src/os/unix/ngx_alloc.c @@ -21,7 +21,7 @@ ngx_alloc(size_t size, ngx_log_t *log) p = malloc(size); if (p == NULL) { ngx_log_error(NGX_LOG_EMERG, log, ngx_errno, - "malloc() %uz bytes failed", size); + "malloc(%uz) failed", size); } ngx_log_debug2(NGX_LOG_DEBUG_ALLOC, log, 0, "malloc: %p:%uz", p, size); @@ -57,8 +57,7 @@ ngx_memalign(size_t alignment, size_t si if (err) { ngx_log_error(NGX_LOG_EMERG, log, err, - "posix_memalign() %uz bytes aligned to %uz failed", - size, alignment); + "posix_memalign(%uz, %uz) failed", alignment, size); p = NULL; } @@ -78,8 +77,7 @@ ngx_memalign(size_t alignment, size_t si p = memalign(alignment, size); if (p == NULL) { ngx_log_error(NGX_LOG_EMERG, log, ngx_errno, - "memalign() %uz bytes aligned to %uz failed", - size, alignment); + "memalign(%uz, %uz) failed", alignment, size); } ngx_log_debug2(NGX_LOG_DEBUG_ALLOC, log, 0,
--- a/src/os/win32/ngx_alloc.c +++ b/src/os/win32/ngx_alloc.c @@ -20,7 +20,7 @@ void *ngx_alloc(size_t size, ngx_log_t * p = malloc(size); if (p == NULL) { ngx_log_error(NGX_LOG_EMERG, log, ngx_errno, - "malloc() %uz bytes failed", size); + "malloc(%uz) failed", size); } ngx_log_debug2(NGX_LOG_DEBUG_ALLOC, log, 0, "malloc: %p:%uz", p, size);