| 15 | |
| 16 | |
| 17 | void * |
| 18 | ngx_alloc(size_t size, ngx_log_t *log) |
| 19 | { |
| 20 | void *p; |
| 21 | |
| 22 | p = malloc(size); |
| 23 | if (p == NULL) { |
| 24 | ngx_log_error(NGX_LOG_EMERG, log, ngx_errno, |
| 25 | "malloc(%uz) failed", size); |
| 26 | } |
| 27 | |
| 28 | ngx_log_debug2(NGX_LOG_DEBUG_ALLOC, log, 0, "malloc: %p:%uz", p, size); |
| 29 | |
| 30 | return p; |
| 31 | } |
| 32 | |
| 33 | |
| 34 | void * |
no test coverage detected