summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2002-03-29 07:36:44 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2002-03-29 07:36:44 +0000
commit4f605a427098522790624c09e56b076cb52a17d7 (patch)
tree29844f57e73847fe34727620edc1a4da13c79140
parent6c8d6da6600962c3c30bb2c4e51ba732e1ca969c (diff)
downloadATCD-4f605a427098522790624c09e56b076cb52a17d7.tar.gz
ChangeLogTag: Fri Mar 29 08:31:12 2002 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r--ChangeLog10
-rw-r--r--ChangeLogs/ChangeLog-02a10
-rw-r--r--ChangeLogs/ChangeLog-03a10
-rw-r--r--tests/Cached_Allocator_Test.cpp60
-rw-r--r--tests/Makefile.bor1
5 files changed, 58 insertions, 33 deletions
diff --git a/ChangeLog b/ChangeLog
index 9a24b97370c..391a639baeb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Fri Mar 29 08:32:12 2002 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * tests/Makefile.bor:
+ Added new Cached_Allocator_Test
+
+ * tests/Cached_Allocator_Test.cpp:
+ Fixed unicode build errors
+
Thu Mar 28 23:47:00 2002 Si Mong Park <spark@ociweb.com>
* ace/OS.h:
@@ -118,7 +126,7 @@ Thu Mar 28 16:15:17 2002 Douglas C. Schmidt <schmidt@tango.doc.wustl.edu>
Thu Mar 28 13:31:19 2002 Priyanka Gontla <pgontla@ece.uci.edu>
- * ace/POSIX_Asynch_IO.cpp (handle_close):
+ * ace/POSIX_Asynch_IO.cpp (handle_close):
Fixed the warnings on Debian_Core build that were caused by the
changes earlier today.
diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a
index 9a24b97370c..391a639baeb 100644
--- a/ChangeLogs/ChangeLog-02a
+++ b/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,11 @@
+Fri Mar 29 08:32:12 2002 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * tests/Makefile.bor:
+ Added new Cached_Allocator_Test
+
+ * tests/Cached_Allocator_Test.cpp:
+ Fixed unicode build errors
+
Thu Mar 28 23:47:00 2002 Si Mong Park <spark@ociweb.com>
* ace/OS.h:
@@ -118,7 +126,7 @@ Thu Mar 28 16:15:17 2002 Douglas C. Schmidt <schmidt@tango.doc.wustl.edu>
Thu Mar 28 13:31:19 2002 Priyanka Gontla <pgontla@ece.uci.edu>
- * ace/POSIX_Asynch_IO.cpp (handle_close):
+ * ace/POSIX_Asynch_IO.cpp (handle_close):
Fixed the warnings on Debian_Core build that were caused by the
changes earlier today.
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index 9a24b97370c..391a639baeb 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,11 @@
+Fri Mar 29 08:32:12 2002 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * tests/Makefile.bor:
+ Added new Cached_Allocator_Test
+
+ * tests/Cached_Allocator_Test.cpp:
+ Fixed unicode build errors
+
Thu Mar 28 23:47:00 2002 Si Mong Park <spark@ociweb.com>
* ace/OS.h:
@@ -118,7 +126,7 @@ Thu Mar 28 16:15:17 2002 Douglas C. Schmidt <schmidt@tango.doc.wustl.edu>
Thu Mar 28 13:31:19 2002 Priyanka Gontla <pgontla@ece.uci.edu>
- * ace/POSIX_Asynch_IO.cpp (handle_close):
+ * ace/POSIX_Asynch_IO.cpp (handle_close):
Fixed the warnings on Debian_Core build that were caused by the
changes earlier today.
diff --git a/tests/Cached_Allocator_Test.cpp b/tests/Cached_Allocator_Test.cpp
index 13fc5842498..8f6deeacd7c 100644
--- a/tests/Cached_Allocator_Test.cpp
+++ b/tests/Cached_Allocator_Test.cpp
@@ -24,7 +24,7 @@ ACE_RCSID(tests, Cached_Allocator_Test, "$Id$")
typedef ACE_Dynamic_Cached_Allocator<ACE_SYNCH_NULL_MUTEX> DYNAMIC_ALLOCATOR;
-static int
+static int
speed_test (ACE_UINT32 loops)
{
#ifndef ACE_LACKS_FLOATING_POINT
@@ -41,8 +41,8 @@ speed_test (ACE_UINT32 loops)
size_t chunk_size = 8;
ACE_DEBUG ((LM_INFO,
- ACE_TEXT (" (%t) ACE_Dynamic_Cached_Allocator "
- "speed test...\n")));
+ ACE_TEXT (" (%t) ACE_Dynamic_Cached_Allocator ")
+ ACE_TEXT ("speed test...\n")));
DYNAMIC_ALLOCATOR allocator (n_chunks, chunk_size);
@@ -63,18 +63,18 @@ speed_test (ACE_UINT32 loops)
ACE_DEBUG ((LM_INFO, ACE_TEXT (" (%t) Iterations : %d\n"), loops));
#ifdef ACE_LACKS_FLOATING_POINT
- ACE_DEBUG ((LM_INFO, ACE_TEXT (" (%t) Total time : %d s, %d us\n"),
+ ACE_DEBUG ((LM_INFO, ACE_TEXT (" (%t) Total time : %d s, %d us\n"),
tc.sec (), tc.usec ()));
#elif !defined ACE_LACKS_FLOATING_POINT
tt = tc.sec () + tc.usec ()*1.0e-6;
ut = tt/loops;
utus = ut*1.0e6;
speed = loops/tt;
-
+
ACE_DEBUG ((LM_INFO, ACE_TEXT (" (%t) Total time : %.6g [s]\n"), tt));
ACE_DEBUG ((LM_INFO, ACE_TEXT (" (%t) Unit time : %.6g [us]\n"), utus));
ACE_DEBUG ((LM_INFO, ACE_TEXT (" (%t) Speed : %.6g [1/s]\n"), speed));
-
+
#endif /* !defined ACE_LACKS_FLOATING_POINT */
return 0;
@@ -83,7 +83,7 @@ speed_test (ACE_UINT32 loops)
typedef char MEMBLOCK[8];
typedef ACE_Cached_Allocator<MEMBLOCK, ACE_SYNCH_NULL_MUTEX> STATIC_ALLOCATOR;
-static int
+static int
stdspeed_test (ACE_UINT32 loops)
{
@@ -100,8 +100,8 @@ stdspeed_test (ACE_UINT32 loops)
size_t n_chunks = 10,
chunk_size = 8;
- ACE_DEBUG ((LM_INFO, ACE_TEXT (" (%t) ACE_Cached_Allocator "
- "speed test...\n")));
+ ACE_DEBUG ((LM_INFO, ACE_TEXT (" (%t) ACE_Cached_Allocator ")
+ ACE_TEXT ("speed test...\n")));
STATIC_ALLOCATOR allocator (n_chunks);
@@ -120,24 +120,24 @@ stdspeed_test (ACE_UINT32 loops)
ACE_DEBUG ((LM_INFO, ACE_TEXT (" (%t) Iterations : %d\n"), loops));
#ifdef ACE_LACKS_FLOATING_POINT
- ACE_DEBUG ((LM_INFO, ACE_TEXT (" (%t) Total time : %d s, %d us\n"),
+ ACE_DEBUG ((LM_INFO, ACE_TEXT (" (%t) Total time : %d s, %d us\n"),
tc.sec (), tc.usec ()));
#elif !defined ACE_LACKS_FLOATING_POINT
tt = tc.sec () + tc.usec ()*1.0e-6;
ut = tt/loops;
utus = ut*1.0e6;
speed = loops/tt;
-
+
ACE_DEBUG ((LM_INFO, ACE_TEXT (" (%t) Total time : %.6g [s]\n"), tt));
ACE_DEBUG ((LM_INFO, ACE_TEXT (" (%t) Unit time : %.6g [us]\n"), utus));
ACE_DEBUG ((LM_INFO, ACE_TEXT (" (%t) Speed : %.6g [1/s]\n"), speed));
-
+
#endif /* !defined ACE_LACKS_FLOATING_POINT */
return 0;
}
-int
+int
ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
ACE_START_TEST (ACE_TEXT ("Cached_Allocator_Test"));
@@ -158,21 +158,21 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
loops = 100000000;
else
loops = ACE_OS::atoi (argv[1]);
-
+
chunk_size = 8;
n_chunks = 2;
-
+
ACE_DEBUG ((LM_INFO,
- ACE_TEXT (" (%t) Creating allocator: "
- "%d chunks, %d bytes each\n"),
- n_chunks,
+ ACE_TEXT (" (%t) Creating allocator: ")
+ ACE_TEXT ("%d chunks, %d bytes each\n"),
+ n_chunks,
chunk_size));
-
+
DYNAMIC_ALLOCATOR allocator (n_chunks, chunk_size);
requested_size = chunk_size;
- ACE_DEBUG ((LM_INFO,
- ACE_TEXT (" (%t) Allocating chunk 1: %d bytes, should succeed...\n"),
+ ACE_DEBUG ((LM_INFO,
+ ACE_TEXT (" (%t) Allocating chunk 1: %d bytes, should succeed...\n"),
requested_size));
ptr1 = (char *) allocator.malloc (requested_size);
@@ -182,8 +182,8 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
ACE_DEBUG ((LM_INFO, ACE_TEXT (" (%t) OK, succeeded.\n")));
requested_size = chunk_size + 1;
- ACE_DEBUG ((LM_INFO,
- ACE_TEXT (" (%t) Allocating chunk 2: %d bytes, too big, should fail...\n"),
+ ACE_DEBUG ((LM_INFO,
+ ACE_TEXT (" (%t) Allocating chunk 2: %d bytes, too big, should fail...\n"),
requested_size));
ptr2 = (char *) allocator.malloc (requested_size);
@@ -194,8 +194,8 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
requested_size = chunk_size - 1;
ACE_DEBUG ((LM_INFO,
- ACE_TEXT (" (%t) Allocating chunk 3: %d bytes, "
- "should succeed...\n"),
+ ACE_TEXT (" (%t) Allocating chunk 3: %d bytes, ")
+ ACE_TEXT ("should succeed...\n"),
requested_size));
ptr3 = (char *) allocator.malloc (requested_size);
if (!ptr3)
@@ -205,9 +205,9 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
// One chunk too far...
requested_size = chunk_size;
- ACE_DEBUG ((LM_INFO,
- ACE_TEXT (" (%t) Allocating chunk 4: %d bytes, no free chunks,"
- " should fail...\n"),
+ ACE_DEBUG ((LM_INFO,
+ ACE_TEXT (" (%t) Allocating chunk 4: %d bytes, no free chunks,")
+ ACE_TEXT (" should fail...\n"),
requested_size));
ptr4 = (char *) allocator.malloc (requested_size);
@@ -230,8 +230,8 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
allocator.free (ptr1);
requested_size = chunk_size;
- ACE_DEBUG ((LM_INFO, ACE_TEXT (" (%t) Allocating chunk: %d bytes, "
- "should succeed...\n"),
+ ACE_DEBUG ((LM_INFO, ACE_TEXT (" (%t) Allocating chunk: %d bytes, ")
+ ACE_TEXT ("should succeed...\n"),
requested_size));
ptr1 = (char *) allocator.malloc (requested_size);
if (!ptr1)
diff --git a/tests/Makefile.bor b/tests/Makefile.bor
index 55592f74cdb..9f6906f3682 100644
--- a/tests/Makefile.bor
+++ b/tests/Makefile.bor
@@ -15,6 +15,7 @@ NAMES = \
Buffer_Stream_Test \
Cache_Map_Manager_Test \
Cached_Accept_Conn_Test \
+ Cached_Allocator_Test \
Cached_Conn_Test \
Capabilities_Test \
CDR_Array_Test \