diff options
author | dillon <dillon@FreeBSD.org> | 1998-09-26 03:24:14 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 1998-09-26 03:24:14 +0000 |
commit | 7897bd89f85a0dcd0646f46b5e63c5af4ee8ea7b (patch) | |
tree | bf189da95f5d0084d197bac4a7b8015337a6f908 /lib/libstand | |
parent | ea783268e73e47b0c3012339d1e278e7045e2305 (diff) | |
download | FreeBSD-src-7897bd89f85a0dcd0646f46b5e63c5af4ee8ea7b.zip FreeBSD-src-7897bd89f85a0dcd0646f46b5e63c5af4ee8ea7b.tar.gz |
Fixed setting of mp_End in zextendPool(). A case was missing and mp_Size
no longer reflects the mp_End - mp_Base equivalent.
Diffstat (limited to 'lib/libstand')
-rw-r--r-- | lib/libstand/zalloc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libstand/zalloc.c b/lib/libstand/zalloc.c index b441702..053409b 100644 --- a/lib/libstand/zalloc.c +++ b/lib/libstand/zalloc.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: zalloc.c,v 1.1 1998/09/26 01:42:39 msmith Exp $ */ /* @@ -514,6 +514,7 @@ zextendPool(MemPool *mp, void *base, iaddr_t bytes) if (mp->mp_Size == 0) { mp->mp_Base = base; mp->mp_Used = bytes; + mp->mp_End = (char *)base + bytes; } else { void *pend = (char *)mp->mp_Base + mp->mp_Size; @@ -526,8 +527,8 @@ zextendPool(MemPool *mp, void *base, iaddr_t bytes) if (base > pend) { /* mp->mp_Size += (char *)base - (char *)pend; */ mp->mp_Used += (char *)base - (char *)pend; + mp->mp_End = (char *)base; } - mp->mp_End = (char *)mp->mp_Base + mp->mp_Size; } mp->mp_Size += bytes; } |