[master] a2e72e8 Add vsc for requested and needed sizes for mempool.

Poul-Henning Kamp phk at varnish-cache.org
Mon Dec 26 17:45:22 CET 2011


commit a2e72e8fa66d871903f99a4973687ba7c3c6a7c8
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Dec 26 16:36:09 2011 +0000

    Add vsc for requested and needed sizes for mempool.
    
    Fix sess mempool names

diff --git a/bin/varnishd/cache/cache_mempool.c b/bin/varnishd/cache/cache_mempool.c
index 6f556f2..a9d4249 100644
--- a/bin/varnishd/cache/cache_mempool.c
+++ b/bin/varnishd/cache/cache_mempool.c
@@ -80,6 +80,8 @@ mpl_alloc(const struct mempool *mpl)
 	AN(mi);
 	mi->magic = MEMITEM_MAGIC;
 	mi->size = tsz;
+	mpl->vsc->sz_wanted = tsz;
+	mpl->vsc->sz_needed = tsz + sizeof *mi;
 	return (mi);
 }
 
diff --git a/bin/varnishd/cache/cache_session.c b/bin/varnishd/cache/cache_session.c
index ee5060f..d1dbaba 100644
--- a/bin/varnishd/cache/cache_session.c
+++ b/bin/varnishd/cache/cache_session.c
@@ -318,6 +318,7 @@ SES_NewPool(struct pool *wp, unsigned pool_no)
 	bprintf(nb, "req%u", pool_no);
 	pp->mpl_req = MPL_New(nb, &cache_param->req_pool,
 	    &cache_param->workspace_client);
+	bprintf(nb, "sess%u", pool_no);
 	pp->mpl_sess = MPL_New(nb, &cache_param->sess_pool, &ses_size);
 	return (pp);
 }



More information about the varnish-commit mailing list