mirror of
https://github.com/nginx/nginx.git
synced 2024-11-27 23:49:00 +08:00
ngx_reset_pool()
This commit is contained in:
parent
ecbb69ad7f
commit
65eba4b692
@ -91,6 +91,26 @@ ngx_destroy_pool(ngx_pool_t *pool)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
ngx_reset_pool(ngx_pool_t *pool)
|
||||||
|
{
|
||||||
|
ngx_pool_t *p;
|
||||||
|
ngx_pool_large_t *l;
|
||||||
|
|
||||||
|
for (l = pool->large; l; l = l->next) {
|
||||||
|
if (l->alloc) {
|
||||||
|
ngx_free(l->alloc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pool->large = NULL;
|
||||||
|
|
||||||
|
for (p = pool; p; p = p->d.next) {
|
||||||
|
p->d.last = (u_char *) p + sizeof(ngx_pool_t);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void *
|
void *
|
||||||
ngx_palloc(ngx_pool_t *pool, size_t size)
|
ngx_palloc(ngx_pool_t *pool, size_t size)
|
||||||
{
|
{
|
||||||
|
@ -73,6 +73,7 @@ void *ngx_calloc(size_t size, ngx_log_t *log);
|
|||||||
|
|
||||||
ngx_pool_t *ngx_create_pool(size_t size, ngx_log_t *log);
|
ngx_pool_t *ngx_create_pool(size_t size, ngx_log_t *log);
|
||||||
void ngx_destroy_pool(ngx_pool_t *pool);
|
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_palloc(ngx_pool_t *pool, size_t size);
|
||||||
void *ngx_pnalloc(ngx_pool_t *pool, size_t size);
|
void *ngx_pnalloc(ngx_pool_t *pool, size_t size);
|
||||||
|
Loading…
Reference in New Issue
Block a user