diff --git a/mps/code/locus.c b/mps/code/locus.c index e3cbef3a8a2..c826cbe71d8 100644 --- a/mps/code/locus.c +++ b/mps/code/locus.c @@ -342,6 +342,7 @@ Res ChainCondemnAuto(double *mortalityReturn, Chain chain, Trace trace) genNewSize = GenDescNewSize(gen); } while (genNewSize >= gen->capacity * (Size)1024); + AVER(condemnedSet != ZoneSetEMPTY || condemnedSize == 0); EVENT3(ChainCondemnAuto, chain, topCondemnedGenSerial, chain->genCount); UNUSED(topCondemnedGenSerial); /* only used for EVENT */ diff --git a/mps/code/poolawl.c b/mps/code/poolawl.c index d3245b265d7..4dbd659cb27 100644 --- a/mps/code/poolawl.c +++ b/mps/code/poolawl.c @@ -48,9 +48,6 @@ SRCID(poolawl, "$Id$"); #define AWLSig ((Sig)0x519B7A37) /* SIGnature PooL AWL */ -#define AWLGen ((Serial)1) /* "generation" for AWL pools */ -/* This and the dynamic criterion are the only ways AWL will get collected. */ - /* awlStat* -- Statistics gathering about instruction emulation * @@ -90,7 +87,6 @@ typedef struct AWLStruct { Chain chain; /* dummy chain */ PoolGenStruct pgen; /* generation representing the pool */ Size size; /* allocated size in bytes */ - Serial gen; /* associated generation (for SegAlloc) */ Count succAccesses; /* number of successive single accesses */ FindDependentMethod findDependent; /* to find a dependent object */ awlStatTotalStruct stats; @@ -470,9 +466,10 @@ static Res AWLSegCreate(AWLSeg *awlsegReturn, if (size == 0) return ResMEMORY; MPS_ARGS_BEGIN(args) { + Serial gen = 0; /* AWL only has one generation in its chain */ MPS_ARGS_ADD_FIELD(args, awlKeySegRankSet, u, rankSet); MPS_ARGS_DONE(args); - res = ChainAlloc(&seg, awl->chain, awl->gen, AWLSegClassGet(), + res = ChainAlloc(&seg, awl->chain, gen, AWLSegClassGet(), size, pool, reservoirPermit, args); } MPS_ARGS_END(args); if (res != ResOK) @@ -569,7 +566,6 @@ static Res AWLInit(Pool pool, ArgList args) goto failGenInit; awl->alignShift = SizeLog2(pool->alignment); - awl->gen = AWLGen; awl->size = (Size)0; awl->succAccesses = 0; @@ -1300,9 +1296,6 @@ static Bool AWLCheck(AWL awl) CHECKL(awl->poolStruct.class == AWLPoolClassGet()); CHECKL((Align)1 << awl->alignShift == awl->poolStruct.alignment); CHECKD(Chain, awl->chain); - CHECKL(NONNEGATIVE(awl->gen)); - /* 30 is just a sanity check really, not a constraint. */ - CHECKL(awl->gen <= 30); /* Nothing to check about succAccesses. */ CHECKL(FUNCHECK(awl->findDependent)); /* Don't bother to check stats. */ diff --git a/mps/code/poollo.c b/mps/code/poollo.c index 971c83ea556..1d1077145a0 100644 --- a/mps/code/poollo.c +++ b/mps/code/poollo.c @@ -15,9 +15,6 @@ SRCID(poollo, "$Id$"); -#define LOGen ((Serial)1) - - /* LOStruct -- leaf object pool instance structure */ #define LOSig ((Sig)0x51970B07) /* SIGnature LO POoL */ @@ -27,7 +24,6 @@ typedef struct LOStruct *LO; typedef struct LOStruct { PoolStruct poolStruct; /* generic pool structure */ Shift alignShift; /* log_2 of pool alignment */ - Serial gen; /* generation for placement */ Chain chain; /* chain used by this pool */ PoolGenStruct pgen; /* generation representing the pool */ Sig sig; @@ -286,6 +282,7 @@ static Res loSegCreate(LOSeg *loSegReturn, Pool pool, Size size, LO lo; Seg seg; Res res; + Serial gen; AVER(loSegReturn != NULL); AVERT(Pool, pool); @@ -294,7 +291,8 @@ static Res loSegCreate(LOSeg *loSegReturn, Pool pool, Size size, lo = PoolPoolLO(pool); AVERT(LO, lo); - res = ChainAlloc(&seg, lo->chain, lo->gen, EnsureLOSegClass(), + gen = 0; /* LO only has one generation in its chain */ + res = ChainAlloc(&seg, lo->chain, gen, EnsureLOSegClass(), SizeAlignUp(size, ArenaAlign(PoolArena(pool))), pool, withReservoirPermit, argsNone); if (res != ResOK) @@ -494,7 +492,6 @@ static Res LOInit(Pool pool, ArgList args) lo->poolStruct.alignment = format->alignment; lo->alignShift = SizeLog2((Size)PoolAlignment(&lo->poolStruct)); - lo->gen = LOGen; /* may be modified in debugger */ res = ChainCreate(&lo->chain, arena, 1, &loGenParam); if (res != ResOK) return res;