summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-05-22 01:28:32 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-05-22 01:28:32 +0000
commitb4adf5e7dde25f2c53513fed33eb5511e5f64d5c (patch)
tree3f6e4274eb534440f99c9832521192b4df84c0aa
parent8b6d1a8a6dc70398d0a977f1aefb72d3465422f7 (diff)
downloadATCD-b4adf5e7dde25f2c53513fed33eb5511e5f64d5c.tar.gz
ChangeLogTag:Wed May 21 19:55:54 2003 Nanbor Wang <nanbor@cs.wustl.edu>
-rw-r--r--ChangeLog21
-rw-r--r--ace/MEM_Acceptor.h7
-rw-r--r--ace/MEM_Acceptor.i9
-rw-r--r--ace/MEM_Connector.h1
-rw-r--r--ace/MEM_Connector.i3
-rw-r--r--tests/MEM_Stream_Test.cpp4
6 files changed, 43 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index c0bac564b51..dd5e655156e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+Wed May 21 19:55:54 2003 Nanbor Wang <nanbor@cs.wustl.edu>
+
+ Thanks to Tongzhe Cui <tonycui@yahoo.com> for motivating the
+ following changes.
+
+ * ace/MEM_Acceptor.h:
+ * ace/MEM_Acceptor.i (init_buffer_size): Added this new helper
+ function to set the initial buffer size of the newly created
+ ACE_MEM_Stream the acceptor creates subsequently.
+
+ * ace/MEM_Connector.h:
+ * ace/MEM_Connector.i:
+ * ace/MEM_Acceptor.h:
+ * ace/MEM_Acceptor.i: Marked the malloc_options accessor function
+ as deprecated.
+
+ * tests/MEM_Stream_Test.cpp (test_concurrent): Changed to use the
+ new init_buffer_size method to set the buffer size.
+
Thu May 22 00:16:11 UTC 2003 Don Hinton <dhinton@dresystems.com>
* ace/os_include/math.h:
@@ -47,7 +66,7 @@ Wed May 21 14:32:13 UTC 2003 Don Hinton <dhinton@dresystems.com>
* tests/Test_Output.dsp:
Removed post build step that cleaned up old versions of
- Test_Output*.dll.
+ Test_Output*.dll.
Wed May 21 09:25:16 2003 Chad Elliott <elliott_c@ociweb.com>
diff --git a/ace/MEM_Acceptor.h b/ace/MEM_Acceptor.h
index 4e997508444..abda3bb3efd 100644
--- a/ace/MEM_Acceptor.h
+++ b/ace/MEM_Acceptor.h
@@ -100,6 +100,12 @@ public:
const ACE_TCHAR *mmap_prefix (void) const;
void mmap_prefix (const ACE_TCHAR *prefix);
+ /**
+ * Change the initial MMAP buffer size (in bytes) of the MEM_Stream
+ * this MEM_Acceptor creates.
+ */
+ void init_buffer_size (off_t bytes);
+
/// Get the preferred signaling strategy.
ACE_MEM_IO::Signal_Strategy preferred_strategy (void) const;
@@ -111,6 +117,7 @@ public:
int get_local_addr (ACE_MEM_Addr &) const;
/// Accessor to the mmap options.
+ /// This method has been deprecated.
ACE_MEM_SAP::MALLOC_OPTIONS& malloc_options (void);
// = Meta-type info
diff --git a/ace/MEM_Acceptor.i b/ace/MEM_Acceptor.i
index 38f952ec990..07d723c813d 100644
--- a/ace/MEM_Acceptor.i
+++ b/ace/MEM_Acceptor.i
@@ -84,8 +84,17 @@ ACE_MEM_Acceptor::preferred_strategy (ACE_MEM_IO::Signal_Strategy strategy)
this->preferred_strategy_ = strategy;
}
+ASYS_INLINE void
+ACE_MEM_Acceptor::init_buffer_size (off_t bytes)
+{
+ this->malloc_options_.minimum_bytes_ = bytes;
+}
+
ASYS_INLINE ACE_MEM_SAP::MALLOC_OPTIONS &
ACE_MEM_Acceptor::malloc_options (void)
{
+ // @@ This function has been deprecated and will be removed in the
+ // future.
+
return this->malloc_options_;
}
diff --git a/ace/MEM_Connector.h b/ace/MEM_Connector.h
index de83e8732aa..425eb4ce00b 100644
--- a/ace/MEM_Connector.h
+++ b/ace/MEM_Connector.h
@@ -139,6 +139,7 @@ public:
void preferred_strategy (ACE_MEM_IO::Signal_Strategy strategy);
/// Accessor to underlying malloc options.
+ /// This method has been deprecated.
ACE_MEM_SAP::MALLOC_OPTIONS &malloc_options (void);
// = Meta-type info
diff --git a/ace/MEM_Connector.i b/ace/MEM_Connector.i
index 09e311d76a2..d1b06cce369 100644
--- a/ace/MEM_Connector.i
+++ b/ace/MEM_Connector.i
@@ -20,5 +20,8 @@ ACE_MEM_Connector::preferred_strategy (ACE_MEM_IO::Signal_Strategy strategy)
ASYS_INLINE ACE_MEM_SAP::MALLOC_OPTIONS &
ACE_MEM_Connector::malloc_options (void)
{
+ // @@ This function has been deprecated and will be removed in the
+ // future.
+
return this->malloc_options_;
}
diff --git a/tests/MEM_Stream_Test.cpp b/tests/MEM_Stream_Test.cpp
index dd2c725e593..b4bcee319be 100644
--- a/tests/MEM_Stream_Test.cpp
+++ b/tests/MEM_Stream_Test.cpp
@@ -348,7 +348,9 @@ test_concurrent (const ACE_TCHAR *prog,
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("MEM_Acceptor::accept\n")), 1);
- acceptor.acceptor ().malloc_options ().minimum_bytes_ = 1024 * 1024;
+ // Make sure the MEM_Stream created by the underlying MEM_Acceptor
+ // is capable of passing messages of 1MB.
+ acceptor.acceptor ().init_buffer_size (1024 * 1024);
acceptor.acceptor ().mmap_prefix (ACE_TEXT ("MEM_Acceptor_"));
acceptor.acceptor ().preferred_strategy (ACE_MEM_IO::MT);