1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-18 17:01:01 -08:00

Fix seg free with buffer (change.epcore.chub.160193)

Copied from Perforce
 Change: 20557
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Pekka Pirinen 1999-02-12 20:38:11 +00:00
parent 1bb8798176
commit ef0dc0220a

View file

@ -1,6 +1,6 @@
/* impl.c.poolmvff: First Fit Manual Variable Pool
*
* $HopeName: MMsrc!poolmvff.c(trunk.14) $
* $HopeName: MMsrc!poolmvff.c(trunk.15) $
* Copyright (C) 1998, 1999 Harlequin Group plc. All rights reserved.
*
* .purpose: This is a pool class for manually managed objects of
@ -24,7 +24,7 @@
#include "cbs.h"
#include "mpm.h"
SRCID(poolmvff, "$HopeName: MMsrc!poolmvff.c(trunk.14) $");
SRCID(poolmvff, "$HopeName: MMsrc!poolmvff.c(trunk.15) $");
/* Would go in poolmvff.h if the class had any MPS-internal clients. */
@ -148,6 +148,8 @@ static void MVFFFreeSegs(MVFF mvff, Addr base, Addr limit)
AVER(res == ResOK);
mvff->free -= AddrOffset(segBase, segLimit);
mvff->total -= AddrOffset(segBase, segLimit);
if(SegBuffer(seg) != NULL)
BufferDetach(SegBuffer(seg), MVFFPool(mvff));
SegFree(seg);
}
@ -171,6 +173,8 @@ static void MVFFFreeSegs(MVFF mvff, Addr base, Addr limit)
AVER(res == ResOK);
mvff->free -= AddrOffset(base, limit);
mvff->total -= AddrOffset(segBase, segLimit);
if(SegBuffer(seg) != NULL)
BufferDetach(SegBuffer(seg), MVFFPool(mvff));
SegFree(seg);
}
}