diff options
author | bala <balanatarajan@users.noreply.github.com> | 2002-08-03 17:29:54 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2002-08-03 17:29:54 +0000 |
commit | 9c6d8a881e70a3b8c680eadebd720b07747e288c (patch) | |
tree | 3f615dfb7c262ab3695fd4230cc9d6bef8eb1eca | |
parent | c992742e4285facd623199856da204f0a09a5abe (diff) | |
download | ATCD-9c6d8a881e70a3b8c680eadebd720b07747e288c.tar.gz |
ChangeLogTag:Sat Aug 03 12:42:43 2002 Balachandran Natarajan <bala@cs.wustl.edu>
-rw-r--r-- | TAO/ChangeLog | 8 | ||||
-rw-r--r-- | TAO/tao/Thread_Lane_Resources.cpp | 35 | ||||
-rw-r--r-- | TAO/tao/Transport.cpp | 35 |
3 files changed, 60 insertions, 18 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index a3da6a1fb44..cfefece7502 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,11 @@ +Sat Aug 03 12:42:43 2002 Balachandran Natarajan <bala@cs.wustl.edu> + + * tao/Thread_Lane_Resources.cpp: Remove the allocators from the + lane only after closing down the Reactor and Transport + cache. Contents of Reactor or Transport cache, like the event + handler and the transport could be using the allocators to + release memory. The allocator needs to be around till then! + Sat Aug 3 09:15:03 2002 Balachandran Natarajan <bala@cs.wustl.edu> * orbsvcs/PSS/PSDL_Node_Visitor.cpp (visit_export_dcl): Fixed diff --git a/TAO/tao/Thread_Lane_Resources.cpp b/TAO/tao/Thread_Lane_Resources.cpp index c66f1c2a964..ff2b263fd1d 100644 --- a/TAO/tao/Thread_Lane_Resources.cpp +++ b/TAO/tao/Thread_Lane_Resources.cpp @@ -260,22 +260,6 @@ TAO_Thread_Lane_Resources::finalize (void) delete this->acceptor_registry_; } - if (this->input_cdr_dblock_allocator_ != 0) - this->input_cdr_dblock_allocator_->remove (); - delete this->input_cdr_dblock_allocator_; - - if (this->input_cdr_buffer_allocator_ != 0) - this->input_cdr_buffer_allocator_->remove (); - delete this->input_cdr_buffer_allocator_; - - if (this->input_cdr_msgblock_allocator_ != 0) - this->input_cdr_msgblock_allocator_->remove (); - delete this->input_cdr_msgblock_allocator_; - - if (this->transport_message_buffer_allocator_ != 0) - this->transport_message_buffer_allocator_->remove (); - delete this->transport_message_buffer_allocator_; - // Set of file descriptors corresponding to open connections. This // handle set is used to explicitly deregister the connection event // handlers from the Reactor. This is particularly important for @@ -311,6 +295,25 @@ TAO_Thread_Lane_Resources::finalize (void) delete this->transport_cache_; delete this->leader_follower_; + + // Delete all the allocators here.. They shouldnt be done earlier, + // lest some of the contents in the abve, say reactor or acceptor + // may use memory from the pool.. + if (this->input_cdr_dblock_allocator_ != 0) + this->input_cdr_dblock_allocator_->remove (); + delete this->input_cdr_dblock_allocator_; + + if (this->input_cdr_buffer_allocator_ != 0) + this->input_cdr_buffer_allocator_->remove (); + delete this->input_cdr_buffer_allocator_; + + if (this->input_cdr_msgblock_allocator_ != 0) + this->input_cdr_msgblock_allocator_->remove (); + delete this->input_cdr_msgblock_allocator_; + + if (this->transport_message_buffer_allocator_ != 0) + this->transport_message_buffer_allocator_->remove (); + delete this->transport_message_buffer_allocator_; } void diff --git a/TAO/tao/Transport.cpp b/TAO/tao/Transport.cpp index 194072dc587..b42243d6a09 100644 --- a/TAO/tao/Transport.cpp +++ b/TAO/tao/Transport.cpp @@ -1662,11 +1662,30 @@ TAO_Transport::consolidate_message_queue (ACE_Message_Block &incoming, // If the queue did not have a complete message put this piece of // message in the queue. We kow it did not have a complete // message. That is why we are here. - size_t n = this->incoming_message_queue_.copy_tail (incoming); + size_t n = + this->incoming_message_queue_.copy_tail (incoming); + + if (TAO_debug_level > 6) + { + ACE_DEBUG ((LM_DEBUG, + "(%P|%t) TAO_Transport[%d]::consolidate_message_queue", + "copied [%d] bytes to the tail \n", + this->id (), + n)); + } // Update the missing data... - missing_data = this->incoming_message_queue_.missing_data_tail (); + missing_data = + this->incoming_message_queue_.missing_data_tail (); + if (TAO_debug_level > 6) + { + ACE_DEBUG ((LM_DEBUG, + "(%P|%t) TAO_Transport[%d]::consolidate_message_queue", + "missing [%d] bytes in the tail messahe \n", + this->id (), + missing_data)); + } // Move the read pointer of the <incoming> message block to the end // of the copied message and process the remaining portion... @@ -1737,12 +1756,24 @@ TAO_Transport::consolidate_message_queue (ACE_Message_Block &incoming, TAO_Queued_Data *qd = this->incoming_message_queue_.dequeue_tail (); + if (TAO_debug_level > 5) + ACE_DEBUG ((LM_DEBUG, + "(%P|%t) TAO_Transport[%d]::consolidate_message_queue", + " trying recv, again \n", + this->id ())); + // Try to do a read again. If we have some luck it would be // great.. ssize_t n = this->recv (qd->msg_block_->wr_ptr (), missing_data, max_wait_time); + if (TAO_debug_level > 5) + ACE_DEBUG ((LM_DEBUG, + "(%P|%t) TAO_Transport[%d]::consolidate_message_queue", + " recv retval [%d] \n", + this->id (), + n)); // Error... if (n < 0) return n; |