1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-27 08:43:40 -07:00

Restore condition on collections so that test will terminate even if finalization messages are not delivered.

Copied from Perforce
 Change: 187124
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Gareth Rees 2014-10-02 13:51:31 +01:00
parent 0aa611f22c
commit 6e4cf0ad47

View file

@ -39,6 +39,7 @@
#define churnFACTOR 10
#define finalizationRATE 6
#define gcINTERVAL ((size_t)150 * 1024)
#define collectionCOUNT 3
#define messageCOUNT 3
/* 3 words: wrapper | vector-len | first-slot */
@ -150,7 +151,7 @@ static void test(mps_arena_t arena, mps_pool_class_t pool_class)
mps_message_type_enable(arena, mps_message_type_finalization());
/* <design/poolmrg/#test.promise.ut.churn> */
while (messages < messageCOUNT) {
while (messages < messageCOUNT && mps_collections(arena) < collectionCOUNT) {
/* Perhaps cause (minor) collection */
churn(ap);