diff --git a/mps/code/pool.c b/mps/code/pool.c index 05160aba216..96f853eb94b 100644 --- a/mps/code/pool.c +++ b/mps/code/pool.c @@ -178,6 +178,11 @@ Res PoolInit(Pool pool, Arena arena, PoolClass class, ArgList args) /* Add initialized pool to list of pools in arena. */ RingAppend(&globals->poolRing, &pool->arenaRing); + /* Add initialized pool to list of pools using format. */ + if (pool->format) { + RingAppend(&pool->format->poolRing, &pool->formatRing); + } + return ResOK; failInit: diff --git a/mps/code/poolamc.c b/mps/code/poolamc.c index 34d9ee568c3..4e9ed70396d 100644 --- a/mps/code/poolamc.c +++ b/mps/code/poolamc.c @@ -832,7 +832,6 @@ static Res amcInitComm(Pool pool, RankSet rankSet, ArgList args) ArgRequire(&arg, args, MPS_KEY_FORMAT); pool->format = arg.val.format; - RingAppend(&pool->format->poolRing, &pool->formatRing); if (ArgPick(&arg, args, MPS_KEY_CHAIN)) chain = arg.val.chain; else diff --git a/mps/code/poolams.c b/mps/code/poolams.c index f94695ad1ef..bbb6d70e96a 100644 --- a/mps/code/poolams.c +++ b/mps/code/poolams.c @@ -838,7 +838,6 @@ Res AMSInitInternal(AMS ams, Format format, Chain chain, unsigned gen, pool = AMSPool(ams); AVERT(Pool, pool); pool->format = format; - RingAppend(&format->poolRing, &pool->formatRing); pool->alignment = pool->format->alignment; ams->grainShift = SizeLog2(PoolAlignment(pool)); diff --git a/mps/code/poolawl.c b/mps/code/poolawl.c index 2abbdb06680..0ab42f36e27 100644 --- a/mps/code/poolawl.c +++ b/mps/code/poolawl.c @@ -576,7 +576,6 @@ static Res AWLInit(Pool pool, ArgList args) AVERT(Format, format); pool->format = format; - RingAppend(&format->poolRing, &pool->formatRing); pool->alignment = format->alignment; AVER(FUNCHECK(findDependent)); diff --git a/mps/code/poollo.c b/mps/code/poollo.c index 55e7104448c..5b3ddd608f9 100644 --- a/mps/code/poollo.c +++ b/mps/code/poollo.c @@ -494,7 +494,6 @@ static Res LOInit(Pool pool, ArgList args) ArgRequire(&arg, args, MPS_KEY_FORMAT); pool->format = arg.val.format; - RingAppend(&pool->format->poolRing, &pool->formatRing); if (ArgPick(&arg, args, MPS_KEY_CHAIN)) chain = arg.val.chain; else { diff --git a/mps/code/poolsnc.c b/mps/code/poolsnc.c index c56ce9f74c8..df2d964340b 100644 --- a/mps/code/poolsnc.c +++ b/mps/code/poolsnc.c @@ -388,7 +388,6 @@ static Res SNCInit(Pool pool, ArgList args) AVERT(Format, format); pool->format = format; - RingAppend(&format->poolRing, &pool->formatRing); snc->freeSegs = NULL; snc->sig = SNCSig;