comparison src/http/modules/ngx_http_gzip_filter_module.c @ 434:49a0eb7ce20c NGINX_0_7_29

nginx 0.7.29 *) Bugfix: the "fastcgi_pass" and "proxy_pass" directives did not support variables if unix domain sockets were used. *) Bugfixes in subrequest processing; the bugs had appeared in 0.7.25. *) Bugfix: a "100 Continue" response was issued for HTTP/1.0 requests; Thanks to Maxim Dounin. *) Bugfix: in memory allocation in the ngx_http_gzip_filter_module on Cygwin.
author Igor Sysoev <http://sysoev.ru>
date Wed, 24 Dec 2008 00:00:00 +0300
parents fd759445d8a8
children 6281966854a5
comparison
equal deleted inserted replaced
433:18f6c20ac73a 434:49a0eb7ce20c
936 void *p; 936 void *p;
937 ngx_uint_t alloc; 937 ngx_uint_t alloc;
938 938
939 alloc = items * size; 939 alloc = items * size;
940 940
941 if (alloc % 512 != 0) { 941 if (alloc % 512 != 0 && alloc < 8192) {
942 942
943 /* 943 /*
944 * The zlib deflate_state allocation, it takes about 6K, 944 * The zlib deflate_state allocation, it takes about 6K,
945 * we allocate 8K. Other allocations are divisible by 512. 945 * we allocate 8K. Other allocations are divisible by 512.
946 */ 946 */
947 947
948 alloc = (alloc + ngx_pagesize - 1) & ~(ngx_pagesize - 1); 948 alloc = 8192;
949 } 949 }
950 950
951 if (alloc <= ctx->allocated) { 951 if (alloc <= ctx->allocated) {
952 p = ctx->free_mem; 952 p = ctx->free_mem;
953 ctx->free_mem += alloc; 953 ctx->free_mem += alloc;