Klaus Demo nginx / 65eba4b
ngx_reset_pool() Igor Sysoev 13 years ago
2 changed file(s) with 21 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
8686 if (n == NULL) {
8787 break;
8888 }
89 }
90 }
91
92
93 void
94 ngx_reset_pool(ngx_pool_t *pool)
95 {
96 ngx_pool_t *p;
97 ngx_pool_large_t *l;
98
99 for (l = pool->large; l; l = l->next) {
100 if (l->alloc) {
101 ngx_free(l->alloc);
102 }
103 }
104
105 pool->large = NULL;
106
107 for (p = pool; p; p = p->d.next) {
108 p->d.last = (u_char *) p + sizeof(ngx_pool_t);
89109 }
90110 }
91111
7272
7373 ngx_pool_t *ngx_create_pool(size_t size, ngx_log_t *log);
7474 void ngx_destroy_pool(ngx_pool_t *pool);
75 void ngx_reset_pool(ngx_pool_t *pool);
7576
7677 void *ngx_palloc(ngx_pool_t *pool, size_t size);
7778 void *ngx_pnalloc(ngx_pool_t *pool, size_t size);