You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ja...@apache.org on 2013/05/15 20:52:49 UTC
svn commit: r1483005 - /httpd/httpd/trunk/server/protocol.c
Author: jailletc36
Date: Wed May 15 18:52:49 2013
New Revision: 1483005
URL: http://svn.apache.org/r1483005
Log:
Avoid over allocation when dealing with the common case. As stated in the comment above : "We'll assume the common case where one bucket is enough".
Doing so should save a few hundreds bytes in the 'request' pool when processing a request
Modified:
httpd/httpd/trunk/server/protocol.c
Modified: httpd/httpd/trunk/server/protocol.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/protocol.c?rev=1483005&r1=1483004&r2=1483005&view=diff
==============================================================================
--- httpd/httpd/trunk/server/protocol.c (original)
+++ httpd/httpd/trunk/server/protocol.c Wed May 15 18:52:49 2013
@@ -185,9 +185,6 @@ AP_DECLARE(apr_time_t) ap_rationalize_mt
return (mtime > now) ? now : mtime;
}
-/* Min # of bytes to allocate when reading a request line */
-#define MIN_LINE_ALLOC 80
-
/* Get a line of protocol input, including any continuation lines
* caused by MIME folding (or broken clients) if fold != 0, and place it
* in the buffer s, of size n bytes, without the ending newline.
@@ -290,9 +287,6 @@ AP_DECLARE(apr_status_t) ap_rgetline_cor
/* We'll assume the common case where one bucket is enough. */
if (!*s) {
current_alloc = len;
- if (current_alloc < MIN_LINE_ALLOC) {
- current_alloc = MIN_LINE_ALLOC;
- }
*s = apr_palloc(r->pool, current_alloc);
}
else if (bytes_handled + len > current_alloc) {