trunk patch: http://svn.apache.org/r1483005
Submitted by: jailletc36
Reviewed by: jim, minfrin
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@
1485728 13f79535-47bb-0310-9956-
ffa450edef68
Changes with Apache 2.4.5
+ *) core: Do not over allocate memory within 'ap_rgetline_core' for
+ the common case. [Christophe Jaillet]
+
*) core: speed up (for common cases) and reduce memory usage of
ap_escape_logitem(). This should save 70-100 bytes in the request
pool for a default config. [Christophe Jaillet]
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- * core: Do not over allocate memory within 'ap_rgetline_core' for the common case.
- trunk patch: http://svn.apache.org/r1483005
- 2.4.x patch: trunk works
- +1: jailletc36, jim, minfrin
-
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
[ New proposals should be added at the end of the list ]
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.
/* 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) {