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

Clarify comment, add assert + comment

parent 7d164e06
...@@ -572,9 +572,8 @@ FetchBody(struct worker *wrk, struct object *obj) ...@@ -572,9 +572,8 @@ FetchBody(struct worker *wrk, struct object *obj)
AZ(bo->vgz_rx); AZ(bo->vgz_rx);
/* /*
* It is OK for ->end to just leave the last storage segment * We always call vfp_nop_end() to ditch or trim the last storage
* sitting on wrk->storage, we will always call vfp_nop_end() * segment, to avoid having to replicate that code in all vfp's.
* to get it trimmed or thrown out if empty.
*/ */
AZ(vfp_nop_end(bo)); AZ(vfp_nop_end(bo));
......
...@@ -177,6 +177,8 @@ stv_alloc(struct busyobj *bo, size_t size) ...@@ -177,6 +177,8 @@ stv_alloc(struct busyobj *bo, size_t size)
if (size > cache_param->fetch_maxchunksize) if (size > cache_param->fetch_maxchunksize)
size = cache_param->fetch_maxchunksize; size = cache_param->fetch_maxchunksize;
assert(size <= UINT_MAX); /* field limit in struct storage */
for (;;) { for (;;) {
/* try to allocate from it */ /* try to allocate from it */
AN(stv->alloc); AN(stv->alloc);
......
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