[3.0] f7a2d82 Don't zap the size until we have updated statistics
Tollef Fog Heen
tfheen at varnish-cache.org
Wed Aug 17 11:27:06 CEST 2011
commit f7a2d8272eadda0b2ab3c1de3202d4aa12b02727
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Wed Aug 10 07:50:13 2011 +0000
Don't zap the size until we have updated statistics
diff --git a/bin/varnishd/storage_malloc.c b/bin/varnishd/storage_malloc.c
index 7035ff0..178973a 100644
--- a/bin/varnishd/storage_malloc.c
+++ b/bin/varnishd/storage_malloc.c
@@ -67,8 +67,8 @@ sma_alloc(struct stevedore *st, size_t size)
Lck_Lock(&sma_sc->sma_mtx);
sma_sc->stats->c_req++;
if (sma_sc->sma_alloc + size > sma_sc->sma_max) {
- size = 0;
sma_sc->stats->c_fail += size;
+ size = 0;
} else {
sma_sc->sma_alloc += size;
sma_sc->stats->c_bytes += size;
More information about the varnish-commit
mailing list