diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 5 | ||||
-rw-r--r-- | ace/Message_Block.h | 7 | ||||
-rw-r--r-- | ace/Message_Block.i | 5 |
4 files changed, 22 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index c821647a433..c6016e7d61b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Jul 14 01:55:03 2002 Balachandran Natarajan <bala@cs.wustl.edu> + + * ace/Message_Block.i (reset_allocators): Reset the allocators in + the chain if the message block is chained. + Sun Jul 14 01:43:32 2002 Balachandran Natarajan <bala@cs.wustl.edu> * ace/Message_Block.h: diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index c821647a433..c6016e7d61b 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,8 @@ +Sun Jul 14 01:55:03 2002 Balachandran Natarajan <bala@cs.wustl.edu> + + * ace/Message_Block.i (reset_allocators): Reset the allocators in + the chain if the message block is chained. + Sun Jul 14 01:43:32 2002 Balachandran Natarajan <bala@cs.wustl.edu> * ace/Message_Block.h: diff --git a/ace/Message_Block.h b/ace/Message_Block.h index 986a42d98de..87cc2d6d488 100644 --- a/ace/Message_Block.h +++ b/ace/Message_Block.h @@ -387,6 +387,9 @@ public: /// @@todo: Not sure whether we would need finer control while /// trying to access allocators ie. a method for every allocator. /** + * This method returns the allocators only from the first message + * block in the chain. + * * @param allocator_strategy Strategy used to allocate the * underlying buffer * @@ -403,6 +406,10 @@ public: /// Reset all the allocators in the message block. /// @@todo: Not sure whether we would need finer control while /// trying to reset allocators ie. a method for every allocator. + /** + * This method resets the allocators in all the message blocks in + * the chain. + */ void reset_allocators (ACE_Allocator *allocator_strategy = 0, ACE_Allocator *data_block_allocator = 0, ACE_Allocator *message_block_allocator = 0); diff --git a/ace/Message_Block.i b/ace/Message_Block.i index f7e529d850c..7bb046b3f0d 100644 --- a/ace/Message_Block.i +++ b/ace/Message_Block.i @@ -294,6 +294,11 @@ ACE_Message_Block::reset_allocators (ACE_Allocator *allocator_strategy, data_block_allocator; this->message_block_allocator_ = message_block_allocator; + + if (this->cont () != 0) + this->cont ()->reset_allocators (allocator_strategy, + data_block_allocator, + message_block_allocator); } ACE_INLINE char * |