mirror of
https://github.com/nginx/nginx.git
synced 2025-06-10 19:42:39 +08:00
update allocation error messages
This commit is contained in:
parent
fc514f1d07
commit
b13029c57c
@ -21,7 +21,7 @@ ngx_alloc(size_t size, ngx_log_t *log)
|
|||||||
p = malloc(size);
|
p = malloc(size);
|
||||||
if (p == NULL) {
|
if (p == NULL) {
|
||||||
ngx_log_error(NGX_LOG_EMERG, log, ngx_errno,
|
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);
|
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 size, ngx_log_t *log)
|
|||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
ngx_log_error(NGX_LOG_EMERG, log, err,
|
ngx_log_error(NGX_LOG_EMERG, log, err,
|
||||||
"posix_memalign() %uz bytes aligned to %uz failed",
|
"posix_memalign(%uz, %uz) failed", alignment, size);
|
||||||
size, alignment);
|
|
||||||
p = NULL;
|
p = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,8 +77,7 @@ ngx_memalign(size_t alignment, size_t size, ngx_log_t *log)
|
|||||||
p = memalign(alignment, size);
|
p = memalign(alignment, size);
|
||||||
if (p == NULL) {
|
if (p == NULL) {
|
||||||
ngx_log_error(NGX_LOG_EMERG, log, ngx_errno,
|
ngx_log_error(NGX_LOG_EMERG, log, ngx_errno,
|
||||||
"memalign() %uz bytes aligned to %uz failed",
|
"memalign(%uz, %uz) failed", alignment, size);
|
||||||
size, alignment);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngx_log_debug2(NGX_LOG_DEBUG_ALLOC, log, 0,
|
ngx_log_debug2(NGX_LOG_DEBUG_ALLOC, log, 0,
|
||||||
|
@ -20,7 +20,7 @@ void *ngx_alloc(size_t size, ngx_log_t *log)
|
|||||||
p = malloc(size);
|
p = malloc(size);
|
||||||
if (p == NULL) {
|
if (p == NULL) {
|
||||||
ngx_log_error(NGX_LOG_EMERG, log, ngx_errno,
|
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);
|
ngx_log_debug2(NGX_LOG_DEBUG_ALLOC, log, 0, "malloc: %p:%uz", p, size);
|
||||||
|
Loading…
Reference in New Issue
Block a user