Mercurial > hg > nginx
diff src/core/ngx_slab.h @ 5726:25ade23cf281
Core: added ngx_slab_calloc() and ngx_slab_calloc_locked().
These functions return zeroed memory, analogous to ngx_pcalloc().
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Wed, 04 Jun 2014 15:09:19 +0400 |
parents | c46657e391a3 |
children | 99770a5ea14f |
line wrap: on
line diff
--- a/src/core/ngx_slab.h +++ b/src/core/ngx_slab.h @@ -50,6 +50,8 @@ typedef struct { void ngx_slab_init(ngx_slab_pool_t *pool); void *ngx_slab_alloc(ngx_slab_pool_t *pool, size_t size); void *ngx_slab_alloc_locked(ngx_slab_pool_t *pool, size_t size); +void *ngx_slab_calloc(ngx_slab_pool_t *pool, size_t size); +void *ngx_slab_calloc_locked(ngx_slab_pool_t *pool, size_t size); void ngx_slab_free(ngx_slab_pool_t *pool, void *p); void ngx_slab_free_locked(ngx_slab_pool_t *pool, void *p);