From cd8f0ed2ad9c3580594d260a7e7aa64d11fa47cf Mon Sep 17 00:00:00 2001 From: Richard Kistruck Date: Tue, 16 Dec 2008 16:20:16 +0000 Subject: [PATCH] Mps br/timing global.c: new diag "globalspreparetodestroy", reports if message queue not empty. Copied from Perforce Change: 166952 ServerID: perforce.ravenbrook.com --- mps/code/global.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mps/code/global.c b/mps/code/global.c index bf51bbf5cd6..7051225c12b 100644 --- a/mps/code/global.c +++ b/mps/code/global.c @@ -422,6 +422,9 @@ void GlobalsPrepareToDestroy(Globals arenaGlobals) /* is done before destroying the finalization pool as otherwise */ /* the message queue would have dangling pointers to messages */ /* whose memory has been unmapped. */ + if(MessagePoll(arena)) { + DIAG_SINGLEF(( "GlobalsPrepareToDestroy", "Message queue not empty", NULL )); + } MessageEmpty(arena); /* throw away the BT used by messages */