mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-24 05:22:04 -08:00
Move survivor update to amcwhiten so it works with other actions; handle finishingtime < 0
Copied from Perforce Change: 21425 ServerID: perforce.ravenbrook.com
This commit is contained in:
parent
6cc46afde4
commit
71bf0df38b
1 changed files with 13 additions and 15 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/* impl.c.poolamc: AUTOMATIC MOSTLY-COPYING MEMORY POOL CLASS
|
||||
*
|
||||
* $HopeName: MMsrc!poolamc.c(trunk.41) $
|
||||
* $HopeName: MMsrc!poolamc.c(trunk.42) $
|
||||
* Copyright (C) 2000 Harlequin Limited. All rights reserved.
|
||||
*
|
||||
* .sources: design.mps.poolamc.
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
#include "mpscamc.h"
|
||||
#include "mpm.h"
|
||||
|
||||
SRCID(poolamc, "$HopeName: MMsrc!poolamc.c(trunk.41) $");
|
||||
SRCID(poolamc, "$HopeName: MMsrc!poolamc.c(trunk.42) $");
|
||||
|
||||
|
||||
/* PType enumeration -- distinguishes AMCGen and AMCNailBoard */
|
||||
|
|
@ -1144,6 +1144,10 @@ static Res AMCWhiten(Pool pool, Trace trace, Seg seg)
|
|||
}
|
||||
}
|
||||
|
||||
/* .act.survivors: Whiten inits survivors; Reclaim will decrement it. */
|
||||
/* .stop.restart: Stops AMCBenefit from trying to restart the trace. */
|
||||
gen->survivors = gen->size;
|
||||
|
||||
return ResOK;
|
||||
}
|
||||
|
||||
|
|
@ -1283,24 +1287,18 @@ static Res AMCAct(Pool pool, Action action)
|
|||
res = amcCondemnGens(amc, trace, topCondemnedGenSerial);
|
||||
if (res != ResOK)
|
||||
goto failCondemn;
|
||||
/* .act.survivors: Act inits survivors; Reclaim will decrement it. */
|
||||
/* .stop.restart: Stops AMCBenefit from trying to restart the trace. */
|
||||
currGenSerial = 0;
|
||||
do {
|
||||
gen = amc->gen[currGenSerial];
|
||||
AVERT(AMCGen, gen);
|
||||
gen->survivors = gen->size;
|
||||
if (currGenSerial == topCondemnedGenSerial) break;
|
||||
currGenSerial = AMCGenNext(amc, currGenSerial);
|
||||
} while (TRUE);
|
||||
|
||||
if (topCondemnedGenSerial != TraceTopGen) {
|
||||
TraceStart(trace, TraceEphemeralMortality,
|
||||
(TraceGen0IncrementalityMultiple * TraceGen0Size * 1024uL));
|
||||
} else {
|
||||
TraceStart(trace, TraceTopGenMortality,
|
||||
amcArenaAvail(arena)
|
||||
- trace->condemned * (1 - TraceTopGenMortality));
|
||||
double finishingTime = amcArenaAvail(arena)
|
||||
- trace->condemned * (1.0 - TraceTopGenMortality);
|
||||
|
||||
if (finishingTime < 0)
|
||||
/* Run out of time, should really try a smaller collection. @@@@ */
|
||||
finishingTime = 0.0;
|
||||
TraceStart(trace, TraceTopGenMortality, finishingTime);
|
||||
}
|
||||
|
||||
return ResOK;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue