diff options
author | Igor Sysoev <igor@sysoev.ru> | 2009-12-17 15:25:46 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2009-12-17 15:25:46 +0300 |
commit | 04799a6f7c69c525969255a3bf5acaa4959552d4 (patch) | |
tree | 66be6a0caa6ca245b1c1002cfd8bb006264ab65f /src/core/ngx_palloc.h | |
parent | a75362dcdbd5d8d911ddf135f71b3be68ce5ef31 (diff) |
fix r3331:
*) now pools are aligned to 16 bytes
*) forbidden to set non-aligned pool sizes
Diffstat (limited to 'src/core/ngx_palloc.h')
-rw-r--r-- | src/core/ngx_palloc.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/ngx_palloc.h b/src/core/ngx_palloc.h index 7706df19c..6e6612cca 100644 --- a/src/core/ngx_palloc.h +++ b/src/core/ngx_palloc.h @@ -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); |