diff options
author | Igor Sysoev <igor@sysoev.ru> | 2004-09-20 15:17:02 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2004-09-20 15:17:02 +0000 |
commit | e5dabbf077412b8a7a3caf6501e3a410256fcf72 (patch) | |
tree | ff0f01ba1cfb89d3f1c2af41b5c3df94e4404089 /src | |
parent | a2c81197b55c031741646dc24b3a2a3b5f3a6f5d (diff) | |
download | nginx-e5dabbf077412b8a7a3caf6501e3a410256fcf72.tar.gz nginx-e5dabbf077412b8a7a3caf6501e3a410256fcf72.zip |
nginx-0.0.11-2004-09-20-19:17:02 import
Diffstat (limited to 'src')
-rw-r--r-- | src/event/ngx_event_accept.c | 5 | ||||
-rw-r--r-- | src/http/modules/ngx_http_gzip_filter.c | 10 |
2 files changed, 9 insertions, 6 deletions
diff --git a/src/event/ngx_event_accept.c b/src/event/ngx_event_accept.c index 19808a1e2..9ab04310c 100644 --- a/src/event/ngx_event_accept.c +++ b/src/event/ngx_event_accept.c @@ -129,7 +129,6 @@ void ngx_event_accept(ngx_event_t *ev) #if (NGX_STAT_STUB) (*ngx_stat_accepted)++; - (*ngx_stat_active)++; #endif ngx_accept_disabled = (ngx_uint_t) s + NGX_ACCEPT_THRESHOLD @@ -150,6 +149,10 @@ void ngx_event_accept(ngx_event_t *ev) return; } +#if (NGX_STAT_STUB) + (*ngx_stat_active)++; +#endif + /* set a blocking mode for aio and non-blocking mode for the others */ if (ngx_inherited_nonblocking) { diff --git a/src/http/modules/ngx_http_gzip_filter.c b/src/http/modules/ngx_http_gzip_filter.c index edc643af1..dc101b7fc 100644 --- a/src/http/modules/ngx_http_gzip_filter.c +++ b/src/http/modules/ngx_http_gzip_filter.c @@ -440,9 +440,8 @@ static ngx_int_t ngx_http_gzip_body_filter(ngx_http_request_t *r, * Besides we free this memory as soon as the gzipping will complete * and do not wait while a whole response will be sent to a client. * - * 8K is for zlib deflate_state (~6K). - * - * TODO: 64-bit, autoconf of deflate_state size + * 8K is for zlib deflate_state. It takes 5816 bytes on x86 + * and 5920 bytes on amd64. */ ctx->allocated = 8192 + (1 << (wbits + 2)) + (1 << (memlevel + 9)); @@ -804,8 +803,9 @@ static void *ngx_http_gzip_filter_alloc(void *opaque, u_int items, u_int size) if (alloc % 512 != 0) { /* - * allocate the zlib deflate_state, it takes about 6K on x86, - * we allocate 8K + * The zlib deflate_state allocation, it takes 5816 bytes on x86 + * and 5920 bytes on amd64. + * We allocate 8K. */ alloc = (alloc + ngx_pagesize - 1) & ~(ngx_pagesize - 1); |