diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 2000-01-20 05:22:45 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 2000-01-20 05:22:45 +0000 |
commit | fc8a6dd523150a8e6604c4cd422c3636e1e2f513 (patch) | |
tree | 097c90047535b0ef55bb6c10cdbec754f52887d0 | |
parent | b1cb814498696b9cca8632a4a298d1bf52f002d1 (diff) | |
download | ATCD-fc8a6dd523150a8e6604c4cd422c3636e1e2f513.tar.gz |
ChangeLogTag:Wed Jan 19 23:21:07 2000 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-02a | 7 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 7 | ||||
-rw-r--r-- | ace/Message_Queue_T.cpp | 42 | ||||
-rw-r--r-- | tests/Thread_Pool_Test.cpp | 4 |
5 files changed, 47 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog index 04471f3255f..92435840c61 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Wed Jan 19 23:21:07 2000 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> + + * tests/Thread_Pool_Test.cpp (test_queue_deactivation_shutdown): Make + sure to release the message block once we've decided to shutdown + the message queue to avoid a memory leak. Thanks to David + Levine for reporting this. + Tue Jan 19 13:33:08 2000 Joe Hoffert <joeh@cs.wustl.edu> * ace/ATM_Addr.cpp, ATM_QoS.cpp: diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a index 04471f3255f..92435840c61 100644 --- a/ChangeLogs/ChangeLog-02a +++ b/ChangeLogs/ChangeLog-02a @@ -1,3 +1,10 @@ +Wed Jan 19 23:21:07 2000 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> + + * tests/Thread_Pool_Test.cpp (test_queue_deactivation_shutdown): Make + sure to release the message block once we've decided to shutdown + the message queue to avoid a memory leak. Thanks to David + Levine for reporting this. + Tue Jan 19 13:33:08 2000 Joe Hoffert <joeh@cs.wustl.edu> * ace/ATM_Addr.cpp, ATM_QoS.cpp: diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index 04471f3255f..92435840c61 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,10 @@ +Wed Jan 19 23:21:07 2000 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> + + * tests/Thread_Pool_Test.cpp (test_queue_deactivation_shutdown): Make + sure to release the message block once we've decided to shutdown + the message queue to avoid a memory leak. Thanks to David + Levine for reporting this. + Tue Jan 19 13:33:08 2000 Joe Hoffert <joeh@cs.wustl.edu> * ace/ATM_Addr.cpp, ATM_QoS.cpp: diff --git a/ace/Message_Queue_T.cpp b/ace/Message_Queue_T.cpp index ef3846eb126..0e444e0d642 100644 --- a/ace/Message_Queue_T.cpp +++ b/ace/Message_Queue_T.cpp @@ -178,7 +178,8 @@ ACE_Message_Queue<ACE_SYNCH_USE>::ACE_Message_Queue (size_t hwm, ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::ACE_Message_Queue"); if (this->open (hwm, lwm, ns) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("open"))); + ACE_ERROR ((LM_ERROR, + ASYS_TEXT ("open"))); } template <ACE_SYNCH_DECL> @@ -186,7 +187,8 @@ ACE_Message_Queue<ACE_SYNCH_USE>::~ACE_Message_Queue (void) { ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::~ACE_Message_Queue"); if (this->head_ != 0 && this->close () == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("close"))); + ACE_ERROR ((LM_ERROR, + ASYS_TEXT ("close"))); } // Don't bother locking since if someone calls this function more than @@ -251,7 +253,7 @@ ACE_Message_Queue<ACE_SYNCH_USE>::close (void) int res = this->deactivate_i (); - // Free up the remaining message on the list + // Free up the remaining messages on the queue. for (this->tail_ = 0; this->head_ != 0; ) { @@ -1354,10 +1356,10 @@ ACE_Dynamic_Message_Queue<ACE_SYNCH_USE>::refresh_pending_queue (const ACE_Time_ else if (current_status != ACE_Dynamic_Message_Strategy::LATE) { // if we got here, something is *seriously* wrong with the queue - ACE_ERROR_RETURN((LM_ERROR, - ASYS_TEXT ("Unexpected message priority status [%d] (expected LATE)"), - (int) current_status), - -1); + ACE_ERROR_RETURN ((LM_ERROR, + ASYS_TEXT ("Unexpected message priority status [%d] (expected LATE)"), + (int) current_status), + -1); } /* FALLTHRU */ } @@ -1474,10 +1476,10 @@ ACE_Dynamic_Message_Queue<ACE_SYNCH_USE>::refresh_late_queue (const ACE_Time_Val } else if (current_status != ACE_Dynamic_Message_Strategy::LATE) // if we got here, something is *seriously* wrong with the queue - ACE_ERROR_RETURN((LM_ERROR, - ASYS_TEXT ("Unexpected message priority status [%d] (expected LATE)"), - (int) current_status), - -1); + ACE_ERROR_RETURN ((LM_ERROR, + ASYS_TEXT ("Unexpected message priority status [%d] (expected LATE)"), + (int) current_status), + -1); } else { @@ -1495,17 +1497,17 @@ ACE_Dynamic_Message_Queue<ACE_SYNCH_USE>::refresh_late_queue (const ACE_Time_Val case ACE_Dynamic_Message_Strategy::PENDING: // if we got here, something is *seriously* wrong with the queue - ACE_ERROR_RETURN((LM_ERROR, - ASYS_TEXT ("Unexpected message priority status ") - ASYS_TEXT ("[%d] (expected LATE or BEYOND_LATE)"), - (int) current_status), - -1); + ACE_ERROR_RETURN ((LM_ERROR, + ASYS_TEXT ("Unexpected message priority status ") + ASYS_TEXT ("[%d] (expected LATE or BEYOND_LATE)"), + (int) current_status), + -1); default: // if we got here, something is *seriously* wrong with the queue - ACE_ERROR_RETURN((LM_ERROR, - ASYS_TEXT ("Unknown message priority status [%d]"), - (int) current_status), - -1); + ACE_ERROR_RETURN ((LM_ERROR, + ASYS_TEXT ("Unknown message priority status [%d]"), + (int) current_status), + -1); } } diff --git a/tests/Thread_Pool_Test.cpp b/tests/Thread_Pool_Test.cpp index ed14d876b1c..8dbe89134ba 100644 --- a/tests/Thread_Pool_Test.cpp +++ b/tests/Thread_Pool_Test.cpp @@ -261,6 +261,10 @@ Thread_Pool::test_queue_deactivation_shutdown (void) } else { + // Release the <Message_Block> since we're shutting down and + // don't need it anymore. + + mb->release (); // Deactivate the message queue and return. ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n(%t) deactivating queue for %d threads, ") |