r4666 - trunk/varnish-cache/bin/varnishd
phk at varnish-cache.org
phk at varnish-cache.org
Fri Apr 16 11:40:54 CEST 2010
Author: phk
Date: 2010-04-16 11:40:54 +0200 (Fri, 16 Apr 2010)
New Revision: 4666
Modified:
trunk/varnish-cache/bin/varnishd/cache_ws.c
Log:
Oops: Last commit to this file didn't actually get the changes
it advertized:
Align all WS allocations.
Modified: trunk/varnish-cache/bin/varnishd/cache_ws.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_ws.c 2010-04-16 07:59:28 UTC (rev 4665)
+++ trunk/varnish-cache/bin/varnishd/cache_ws.c 2010-04-16 09:40:54 UTC (rev 4666)
@@ -57,17 +57,17 @@
ws->r == NULL ? 0 : pdiff(ws->f, ws->r),
pdiff(ws->s, ws->e));
assert(ws->s != NULL);
- // assert(PAOK(ws->s));
+ assert(PAOK(ws->s));
assert(ws->e != NULL);
- // assert(PAOK(ws->e));
+ assert(PAOK(ws->e));
assert(ws->s < ws->e);
assert(ws->f >= ws->s);
assert(ws->f <= ws->e);
- // assert(PAOK(ws->f));
+ assert(PAOK(ws->f));
if (ws->r) {
assert(ws->r > ws->s);
assert(ws->r <= ws->e);
- // assert(PAOK(ws->r));
+ assert(PAOK(ws->r));
}
}
@@ -176,7 +176,7 @@
b2 = ws->e - ws->f;
else
b2 = bytes;
- // b2 = PRNDND(b2);
+ b2 = PRNDDN(b2);
xxxassert(ws->f + b2 <= ws->e);
ws->r = ws->f + b2;
DSL(0x02, SLT_Debug, 0, "WS_Reserve(%p, %u/%u) = %u",
@@ -189,7 +189,7 @@
WS_Release(struct ws *ws, unsigned bytes)
{
WS_Assert(ws);
- // bytes = PRNDUP(bytes);
+ bytes = PRNDUP(bytes);
assert(bytes <= ws->e - ws->f);
DSL(0x02, SLT_Debug, 0, "WS_Release(%p, %u)", ws, bytes);
assert(ws->r != NULL);
@@ -207,8 +207,7 @@
assert(ws->r != NULL);
assert(ptr >= ws->f);
assert(ptr <= ws->r);
- // ws->f += PRNDUP(ptr - ws->f);
- ws->f += (ptr - ws->f);
+ ws->f += PRNDUP(ptr - ws->f);
ws->r = NULL;
WS_Assert(ws);
}
More information about the varnish-commit
mailing list