Commit 15144537 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Cache the workspace size from params so it doesn't change under us.


git-svn-id: http://www.varnish-cache.org/svn/trunk@1235 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent ab7bf4c5
......@@ -64,9 +64,10 @@ static struct vbe_conn *
vbe_new_conn(void)
{
struct vbe_conn *vbc;
unsigned char *p;
unsigned char *p, space;
vbc = calloc(sizeof *vbc + params->mem_workspace * 2, 1);
space = params->mem_workspace;
vbc = calloc(sizeof *vbc + space * 2, 1);
if (vbc == NULL)
return (NULL);
VSL_stats->n_vbe_conn++;
......@@ -75,9 +76,9 @@ vbe_new_conn(void)
vbc->http2 = &vbc->http_mem[1];
vbc->fd = -1;
p = (void *)(vbc + 1);
http_Setup(vbc->http, p, params->mem_workspace);
p += params->mem_workspace;
http_Setup(vbc->http2, p, params->mem_workspace);
http_Setup(vbc->http, p, space);
p += space;
http_Setup(vbc->http2, p, space);
return (vbc);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment