mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-05-04 04:11:58 -07:00
The ams pool no longer requires a chain argument, but defaults to the arena default chain.
Chains passed to the AMS pool are no longer required to contain a single generation, though the AMS will only use the first generation by default. Copied from Perforce Change: 184229 ServerID: perforce.ravenbrook.com
This commit is contained in:
parent
870c36adca
commit
89acdbe044
2 changed files with 8 additions and 4 deletions
|
|
@ -218,6 +218,8 @@ int main(int argc, char *argv[])
|
|||
die(mps_fmt_create_A(&format, arena, dylan_fmt_A()), "fmt_create");
|
||||
die(mps_chain_create(&chain, arena, 1, testChain), "chain_create");
|
||||
|
||||
/* TODO: Add tests using the arena default chain. */
|
||||
|
||||
printf("\n\n****************************** Testing AMS Debug\n");
|
||||
MPS_ARGS_BEGIN(args) {
|
||||
MPS_ARGS_ADD(args, MPS_KEY_CHAIN, chain);
|
||||
|
|
|
|||
|
|
@ -766,8 +766,10 @@ static Res AMSInit(Pool pool, ArgList args)
|
|||
AVERT(Pool, pool);
|
||||
AVER(ArgListCheck(args));
|
||||
|
||||
ArgRequire(&arg, args, MPS_KEY_CHAIN);
|
||||
chain = arg.val.chain;
|
||||
if (ArgPick(&arg, args, MPS_KEY_CHAIN))
|
||||
chain = arg.val.chain;
|
||||
else
|
||||
chain = ArenaGlobals(PoolArena(pool))->defaultChain;
|
||||
ArgRequire(&arg, args, MPS_KEY_FORMAT);
|
||||
format = arg.val.format;
|
||||
if (ArgPick(&arg, args, MPS_KEY_AMS_SUPPORT_AMBIGUOUS))
|
||||
|
|
@ -800,8 +802,8 @@ Res AMSInitInternal(AMS ams, Format format, Chain chain, Bool shareAllocTable)
|
|||
pool->alignment = pool->format->alignment;
|
||||
ams->grainShift = SizeLog2(PoolAlignment(pool));
|
||||
|
||||
if (ChainGens(chain) != 1)
|
||||
return ResPARAM;
|
||||
/* TODO: Accept a keyword parameter specifying which generation of the
|
||||
chain to allocate in. */
|
||||
ams->chain = chain;
|
||||
res = PoolGenInit(&ams->pgen, ams->chain, 0, pool);
|
||||
if (res != ResOK)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue