diff --git a/lib/libstand/zalloc.c b/lib/libstand/zalloc.c index e83fccb8ced3..aa8ccd03c0fa 100644 --- a/lib/libstand/zalloc.c +++ b/lib/libstand/zalloc.c @@ -247,22 +247,22 @@ zextendPool(MemPool *mp, void *base, iaddr_t bytes) mp->mp_Base = base; mp->mp_Used = bytes; mp->mp_End = (char *)base + bytes; + mp->mp_Size = bytes; } else { void *pend = (char *)mp->mp_Base + mp->mp_Size; if (base < mp->mp_Base) { - /* mp->mp_Size += (char *)mp->mp_Base - (char *)base; */ + mp->mp_Size += (char *)mp->mp_Base - (char *)base; mp->mp_Used += (char *)mp->mp_Base - (char *)base; mp->mp_Base = base; } base = (char *)base + bytes; if (base > pend) { - /* mp->mp_Size += (char *)base - (char *)pend; */ + mp->mp_Size += (char *)base - (char *)pend; mp->mp_Used += (char *)base - (char *)pend; mp->mp_End = (char *)base; } } - mp->mp_Size += bytes; } #ifdef ZALLOCDEBUG