diff options
author | Igor Sysoev <igor@sysoev.ru> | 2008-06-17 19:00:30 +0400 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2008-06-17 19:00:30 +0400 |
commit | 7f6b2ffc60135a8340213fe8d5d0b70e479e3ac1 (patch) | |
tree | 90325238fc9a9d9a7e8818e76b60cc9e011242aa /src/core/ngx_palloc.h | |
parent | c2eb2cf4cba5f47fbc33eebe279f0d3855401421 (diff) |
*) back out r2040
*) refactor ngx_palloc()
*) introduce ngx_pnalloc()
*) additional pool blocks have smaller header
Diffstat (limited to 'src/core/ngx_palloc.h')
-rw-r--r-- | src/core/ngx_palloc.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/core/ngx_palloc.h b/src/core/ngx_palloc.h index 11e2b41da..34878f5f2 100644 --- a/src/core/ngx_palloc.h +++ b/src/core/ngx_palloc.h @@ -43,12 +43,18 @@ struct ngx_pool_large_s { }; -struct ngx_pool_s { +typedef struct { u_char *last; u_char *end; + ngx_pool_t *next; +} ngx_pool_data_t; + + +struct ngx_pool_s { + ngx_pool_data_t d; + size_t max; ngx_pool_t *current; ngx_chain_t *chain; - ngx_pool_t *next; ngx_pool_large_t *large; ngx_pool_cleanup_t *cleanup; ngx_log_t *log; @@ -69,7 +75,7 @@ ngx_pool_t *ngx_create_pool(size_t size, ngx_log_t *log); void ngx_destroy_pool(ngx_pool_t *pool); void *ngx_palloc(ngx_pool_t *pool, size_t size); -void *ngx_palloc_aligned(ngx_pool_t *pool, size_t size); +void *ngx_pnalloc(ngx_pool_t *pool, size_t size); void *ngx_pcalloc(ngx_pool_t *pool, size_t size); ngx_int_t ngx_pfree(ngx_pool_t *pool, void *p); |