Mercurial > hg > nginx
diff src/core/ngx_palloc.h @ 3388:d788521e4b0e
fix r3331:
*) now pools are aligned to 16 bytes
*) forbidden to set non-aligned pool sizes
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 17 Dec 2009 12:25:46 +0000 |
parents | cb7d05c097db |
children | d620f497c50f |
line wrap: on
line diff
--- a/src/core/ngx_palloc.h Thu Dec 17 10:05:39 2009 +0000 +++ b/src/core/ngx_palloc.h Thu Dec 17 12:25:46 2009 +0000 @@ -19,8 +19,11 @@ #define NGX_MAX_ALLOC_FROM_POOL (ngx_pagesize - 1) #define NGX_DEFAULT_POOL_SIZE (16 * 1024) + +#define NGX_POOL_ALIGNMENT 16 #define NGX_MIN_POOL_SIZE \ - (sizeof(ngx_pool_t) + 2 * sizeof(ngx_pool_large_t)) + ngx_align((sizeof(ngx_pool_t) + 2 * sizeof(ngx_pool_large_t)), \ + NGX_POOL_ALIGNMENT) typedef void (*ngx_pool_cleanup_pt)(void *data);