Klaus Demo nginx / 9eb86c4
do not try to align to a page size, allocate just 8K, this is fixes allocation on Cygwin, it reports 64K page size Igor Sysoev 13 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
937937
938938 alloc = items * size;
939939
940 if (alloc % 512 != 0) {
940 if (alloc % 512 != 0 && alloc < 8192) {
941941
942942 /*
943943 * The zlib deflate_state allocation, it takes about 6K,
944944 * we allocate 8K. Other allocations are divisible by 512.
945945 */
946946
947 alloc = (alloc + ngx_pagesize - 1) & ~(ngx_pagesize - 1);
947 alloc = 8192;
948948 }
949949
950950 if (alloc <= ctx->allocated) {