summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>2002-07-14 06:30:00 +0000
committerbala <balanatarajan@users.noreply.github.com>2002-07-14 06:30:00 +0000
commit33537e7af742b6289b7d9b973144f752fcfe6008 (patch)
tree8b4d8e57a486410e11d28f02a09337cc8ae9b4d8
parentfdc1b6db0a353283ad2659e62f56172892f67295 (diff)
downloadATCD-33537e7af742b6289b7d9b973144f752fcfe6008.tar.gz
ChangeLogTag:Sun Jul 14 01:43:32 2002 Balachandran Natarajan <bala@cs.wustl.edu>
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLogs/ChangeLog-03a6
-rw-r--r--ace/Message_Block.h24
-rw-r--r--ace/Message_Block.i26
4 files changed, 62 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index f21f7c48f78..c821647a433 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sun Jul 14 01:43:32 2002 Balachandran Natarajan <bala@cs.wustl.edu>
+
+ * ace/Message_Block.h:
+ * ace/Message_Block.i: Added two methods viz. reset_allocators ()
+ and access_allocators () to ACE_Message_Block.
+
Sat Jul 13 17:29:35 2002 Balachandran Natarajan <bala@cs.wustl.edu>
* bin/fuzz.pl: Removed the word "warning" from a print statement,
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index f21f7c48f78..c821647a433 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,9 @@
+Sun Jul 14 01:43:32 2002 Balachandran Natarajan <bala@cs.wustl.edu>
+
+ * ace/Message_Block.h:
+ * ace/Message_Block.i: Added two methods viz. reset_allocators ()
+ and access_allocators () to ACE_Message_Block.
+
Sat Jul 13 17:29:35 2002 Balachandran Natarajan <bala@cs.wustl.edu>
* bin/fuzz.pl: Removed the word "warning" from a print statement,
diff --git a/ace/Message_Block.h b/ace/Message_Block.h
index 8a050bdc0be..986a42d98de 100644
--- a/ace/Message_Block.h
+++ b/ace/Message_Block.h
@@ -383,6 +383,30 @@ public:
/// read and write pointers to align with the base.
void reset (void);
+ /// Access all the allocators in the message block.
+ /// @@todo: Not sure whether we would need finer control while
+ /// trying to access allocators ie. a method for every allocator.
+ /**
+ * @param allocator_strategy Strategy used to allocate the
+ * underlying buffer
+ *
+ * @param data_block_allocator Strategy used to allocate the
+ * underlying data block
+ *
+ * @param message_block_allocator Strategy used to allocate the
+ * message block
+ */
+ void access_allocators (ACE_Allocator *&allocator_strategy,
+ ACE_Allocator *&data_block_allocator,
+ ACE_Allocator *&message_block_allocator);
+
+ /// 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.
+ void reset_allocators (ACE_Allocator *allocator_strategy = 0,
+ ACE_Allocator *data_block_allocator = 0,
+ ACE_Allocator *message_block_allocator = 0);
+
/// Get message data.
char *base (void) const;
diff --git a/ace/Message_Block.i b/ace/Message_Block.i
index c7abe9b214a..f7e529d850c 100644
--- a/ace/Message_Block.i
+++ b/ace/Message_Block.i
@@ -270,6 +270,32 @@ ACE_Message_Block::msg_deadline_time (const ACE_Time_Value &dt)
#endif /* ACE_HAS_TIMED_MESSAGE_BLOCKS */
}
+ACE_INLINE void
+ACE_Message_Block::access_allocators (ACE_Allocator *& allocator_strategy,
+ ACE_Allocator *& data_block_allocator,
+ ACE_Allocator *& message_block_allocator)
+{
+ allocator_strategy =
+ this->data_block_->allocator_strategy_;
+ data_block_allocator =
+ this->data_block_->data_block_allocator_;
+ message_block_allocator =
+ this->message_block_allocator_;
+}
+
+ACE_INLINE void
+ACE_Message_Block::reset_allocators (ACE_Allocator *allocator_strategy,
+ ACE_Allocator *data_block_allocator,
+ ACE_Allocator *message_block_allocator)
+{
+ this->data_block_->allocator_strategy_ =
+ allocator_strategy;
+ this->data_block_->data_block_allocator_ =
+ data_block_allocator;
+ this->message_block_allocator_ =
+ message_block_allocator;
+}
+
ACE_INLINE char *
ACE_Message_Block::base (void) const
{