#include <ngx_config.h>
#include <ngx_core.h>
static ngx_inline void *ngx_palloc_small(ngx_pool_t *pool, size_t size,
ngx_uint_t align);
static void *ngx_palloc_block(ngx_pool_t *pool, size_t size);
static void *ngx_palloc_large(ngx_pool_t *pool, size_t size);
ngx_pool_t *
ngx_create_pool(size_t size, ngx_log_t *log)
{ … }
void
ngx_destroy_pool(ngx_pool_t *pool)
{ … }
void
ngx_reset_pool(ngx_pool_t *pool)
{ … }
void *
ngx_palloc(ngx_pool_t *pool, size_t size)
{ … }
void *
ngx_pnalloc(ngx_pool_t *pool, size_t size)
{ … }
static ngx_inline void *
ngx_palloc_small(ngx_pool_t *pool, size_t size, ngx_uint_t align)
{ … }
static void *
ngx_palloc_block(ngx_pool_t *pool, size_t size)
{ … }
static void *
ngx_palloc_large(ngx_pool_t *pool, size_t size)
{ … }
void *
ngx_pmemalign(ngx_pool_t *pool, size_t size, size_t alignment)
{ … }
ngx_int_t
ngx_pfree(ngx_pool_t *pool, void *p)
{ … }
void *
ngx_pcalloc(ngx_pool_t *pool, size_t size)
{ … }
ngx_pool_cleanup_t *
ngx_pool_cleanup_add(ngx_pool_t *p, size_t size)
{ … }
void
ngx_pool_run_cleanup_file(ngx_pool_t *p, ngx_fd_t fd)
{ … }
void
ngx_pool_cleanup_file(void *data)
{ … }
void
ngx_pool_delete_file(void *data)
{ … }
#if 0
static void *
ngx_get_cached_block(size_t size)
{
void *p;
ngx_cached_block_slot_t *slot;
if (ngx_cycle->cache == NULL) {
return NULL;
}
slot = &ngx_cycle->cache[(size + ngx_pagesize - 1) / ngx_pagesize];
slot->tries++;
if (slot->number) {
p = slot->block;
slot->block = slot->block->next;
slot->number--;
return p;
}
return NULL;
}
#endif