diff options
author | Igor Sysoev <igor@sysoev.ru> | 2008-12-24 12:05:55 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2008-12-24 12:05:55 +0000 |
commit | 9eb86c43c7c13575660ee0a3f00c023d7dd558a7 (patch) | |
tree | 039728b4c41e259dd550c53779a5e29c31065c46 | |
parent | 195860b74d04078a5e093439c7dbf5cf56e63966 (diff) | |
download | nginx-9eb86c43c7c13575660ee0a3f00c023d7dd558a7.tar.gz nginx-9eb86c43c7c13575660ee0a3f00c023d7dd558a7.zip |
do not try to align to a page size, allocate just 8K,
this is fixes allocation on Cygwin, it reports 64K page size
-rw-r--r-- | src/http/modules/ngx_http_gzip_filter_module.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http/modules/ngx_http_gzip_filter_module.c b/src/http/modules/ngx_http_gzip_filter_module.c index 843a5b9dc..217331d80 100644 --- a/src/http/modules/ngx_http_gzip_filter_module.c +++ b/src/http/modules/ngx_http_gzip_filter_module.c @@ -938,14 +938,14 @@ ngx_http_gzip_filter_alloc(void *opaque, u_int items, u_int size) alloc = items * size; - if (alloc % 512 != 0) { + if (alloc % 512 != 0 && alloc < 8192) { /* * The zlib deflate_state allocation, it takes about 6K, * we allocate 8K. Other allocations are divisible by 512. */ - alloc = (alloc + ngx_pagesize - 1) & ~(ngx_pagesize - 1); + alloc = 8192; } if (alloc <= ctx->allocated) { |