1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-15 11:21:19 -07:00

When finishing segments should ensure they are unprotected, request.mps.160197

Copied from Perforce
 Change: 20505
 ServerID: perforce.ravenbrook.com
This commit is contained in:
David Jones 1999-01-19 17:15:38 +00:00
parent 8ca2d097e4
commit ffef72756d

View file

@ -1,6 +1,6 @@
/* impl.c.seg: SEGMENTS
*
* $HopeName: MMsrc!seg.c(trunk.12) $
* $HopeName: MMsrc!seg.c(trunk.13) $
* Copyright (C) 1998 Harlequin Group plc. All rights reserved.
*
* .design: The design for this module is design.mps.seg.
@ -16,7 +16,7 @@
#include "mpm.h"
SRCID(seg, "$HopeName: MMsrc!seg.c(trunk.12) $");
SRCID(seg, "$HopeName: MMsrc!seg.c(trunk.13) $");
/* SegCheck -- check the integrity of a segment */
@ -109,24 +109,27 @@ void SegFinish(Seg seg)
{
AVERT(Seg, seg);
if(SegGrey(seg) != TraceSetEMPTY) {
SegSetGrey(seg, TraceSetEMPTY);
}
SegSetRankAndSummary(seg, RankSetEMPTY, RefSetEMPTY);
/* See impl.c.shield.shield.flush */
ShieldFlush(PoolArena(seg->_pool));
/* Check that the segment is not exposed, or in the shield */
/* cache (see impl.c.shield.def.depth). */
AVER(seg->_depth == 0);
/* Check not shielded or protected (so that pages in hysteresis */
/* fund are not protected) */
AVER(seg->_sm == AccessSetEMPTY);
AVER(seg->_pm == AccessSetEMPTY);
/* Don't leave a dangling buffer allocating into hyperspace. */
AVER(seg->_buffer == NULL);
RingRemove(SegPoolRing(seg));
/* Detach the segment from the grey list if it is grey. It is OK */
/* to delete a grey segment provided the objects in it have been */
/* proven to be unreachable by another trace. */
if(seg->_grey != TraceSetEMPTY)
RingRemove(&seg->_greyRing);
RingFinish(&seg->_poolRing);
RingFinish(&seg->_greyRing);
}