Mercurial > hg > nginx-quic
comparison src/http/ngx_http.c @ 7155:29e9571b1989
Gzip: support for a zlib variant from Intel.
A zlib variant from Intel as available from https://github.com/jtkukunas/zlib
uses 64K hash instead of scaling it from the specified memory level, and
also uses 16-byte padding in one of the window-sized memory buffers, and can
force window bits to 13 if compression level is set to 1 and appropriate
compile options are used. As a result, nginx complained with "gzip filter
failed to use preallocated memory" alerts.
This change improves deflate_state allocation detection by testing that
items is 1 (deflate_state is the only allocation where items is 1).
Additionally, on first failure to use preallocated memory we now assume
that we are working with the Intel's modified zlib, and switch to using
appropriate preallocations. If this does not help, we complain with the
usual alerts.
Previous version of this patch was published at
http://mailman.nginx.org/pipermail/nginx/2014-July/044568.html.
The zlib variant in question is used by default in ClearLinux from Intel,
see http://mailman.nginx.org/pipermail/nginx-ru/2017-October/060421.html,
http://mailman.nginx.org/pipermail/nginx-ru/2017-November/060544.html.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Sat, 18 Nov 2017 04:03:27 +0300 |
parents | cce6936ed2f4 |
children | e7b2b907c0f8 |
comparison
equal
deleted
inserted
replaced
7154:595a3de03e91 | 7155:29e9571b1989 |
---|