[nginx] svn commit: r4892 - trunk/src/http
vbart at nginx.com
vbart at nginx.com
Tue Oct 23 14:36:18 UTC 2012
Author: vbart
Date: 2012-10-23 14:36:18 +0000 (Tue, 23 Oct 2012)
New Revision: 4892
URL: http://trac.nginx.org/nginx/changeset/4892/nginx
Log:
ngx_http_keepalive_handler() is now trying to not keep c->buffer's memory for
idle connections.
This behaviour is consistent with the ngx_http_set_keepalive() function and it
should decrease memory usage in some cases (especially if epoll/rtsig is used).
Modified:
trunk/src/http/ngx_http_request.c
Modified: trunk/src/http/ngx_http_request.c
===================================================================
--- trunk/src/http/ngx_http_request.c 2012-10-23 09:08:41 UTC (rev 4891)
+++ trunk/src/http/ngx_http_request.c 2012-10-23 14:36:18 UTC (rev 4892)
@@ -2753,6 +2753,20 @@
ngx_http_close_connection(c);
}
+ /*
+ * Like ngx_http_set_keepalive() we are trying to not hold
+ * c->buffer's memory for a keepalive connection.
+ */
+
+ if (ngx_pfree(c->pool, b->start) == NGX_OK) {
+
+ /*
+ * the special note that c->buffer's memory was freed
+ */
+
+ b->pos = NULL;
+ }
+
return;
}
More information about the nginx-devel
mailing list