r392 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Mon Jul 10 10:10:30 CEST 2006
Author: phk
Date: 2006-07-10 10:10:30 +0200 (Mon, 10 Jul 2006)
New Revision: 392
Modified:
trunk/varnish-cache/bin/varnishd/heritage.h
trunk/varnish-cache/bin/varnishd/varnishd.c
Log:
Put three memory allocation hints into heritage:
mem_http_1_line (512)
Maximum length of the reqeust/response line of a HTTP message
There is no point in filling the entire buffer with junk if
we get a preposterously long first line.
mem_http_header (4096)
Maximum length of entire HTTP header. If we overflow this
we return 400.
mem_workspace (currently 0)
In the future this will be the space we use for constructing
headers to send and edits done from VCL.
Modified: trunk/varnish-cache/bin/varnishd/heritage.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/heritage.h 2006-07-10 07:54:05 UTC (rev 391)
+++ trunk/varnish-cache/bin/varnishd/heritage.h 2006-07-10 08:10:30 UTC (rev 392)
@@ -38,6 +38,11 @@
/* Worker threads */
unsigned wthread_min, wthread_max;
+
+ /* Memory allocation hints */
+ unsigned mem_http_1_line;
+ unsigned mem_http_header;
+ unsigned mem_workspace;
};
extern struct heritage heritage;
Modified: trunk/varnish-cache/bin/varnishd/varnishd.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/varnishd.c 2006-07-10 07:54:05 UTC (rev 391)
+++ trunk/varnish-cache/bin/varnishd/varnishd.c 2006-07-10 08:10:30 UTC (rev 392)
@@ -457,6 +457,9 @@
heritage.default_ttl = 120;
heritage.wthread_min = 5;
heritage.wthread_max = 5;
+ heritage.mem_http_1_line= 512;
+ heritage.mem_http_header= 4096;
+ heritage.mem_workspace = 0;
while ((o = getopt(argc, argv, "b:df:h:p:s:t:w:")) != -1)
switch (o) {
More information about the varnish-commit
mailing list