summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>2002-07-31 17:24:39 +0000
committerSteve Huston <shuston@riverace.com>2002-07-31 17:24:39 +0000
commitbfbe798397e12fddf36497c962901a32fe05e918 (patch)
treee4d77de1909012e5f2f47a6e8f8720089db94b2a
parente6bb6580aa35f46bebd73cf0296ecfba787404a0 (diff)
downloadATCD-bfbe798397e12fddf36497c962901a32fe05e918.tar.gz
ChangeLogTag:Wed Jul 31 12:23:47 2002 Steve Huston <shuston@riverace.com>
-rw-r--r--ChangeLog8
-rw-r--r--ChangeLogs/ChangeLog-03a8
-rw-r--r--ace/Malloc.cpp12
-rw-r--r--ace/Malloc_T.cpp7
-rw-r--r--tests/Malloc_Test.cpp16
-rw-r--r--tests/Mem_Map_Test.cpp2
6 files changed, 36 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index 50552706675..4f102edc965 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Wed Jul 31 12:23:47 2002 Steve Huston <shuston@riverace.com>
+
+ * ace/Malloc.cpp:
+ * ace/Malloc_T.cpp:
+ * tests/Malloc_Test.cpp: Changed logging of pointers to %@
+
+ * tests/Mem_Map_Test.cpp: Fixed loop bound error.
+
Wed Jul 31 11:34:58 2002 Nanbor Wang <nanbor@cs.wustl.edu>
* docs/index.html: Added a link to ACEXML document.
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index 50552706675..4f102edc965 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,11 @@
+Wed Jul 31 12:23:47 2002 Steve Huston <shuston@riverace.com>
+
+ * ace/Malloc.cpp:
+ * ace/Malloc_T.cpp:
+ * tests/Malloc_Test.cpp: Changed logging of pointers to %@
+
+ * tests/Mem_Map_Test.cpp: Fixed loop bound error.
+
Wed Jul 31 11:34:58 2002 Nanbor Wang <nanbor@cs.wustl.edu>
* docs/index.html: Added a link to ACEXML document.
diff --git a/ace/Malloc.cpp b/ace/Malloc.cpp
index 1033462eb48..b0bd07f6d5d 100644
--- a/ace/Malloc.cpp
+++ b/ace/Malloc.cpp
@@ -28,7 +28,7 @@ ACE_Control_Block::ACE_Malloc_Header::dump (void) const
ACE_TRACE ("ACE_Control_Block::ACE_Malloc_Header::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("\nnext_block = %x"), (ACE_Malloc_Header *) this->next_block_));
+ ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("\nnext_block = %@"), (ACE_Malloc_Header *) this->next_block_));
ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("\nsize = %d\n"), this->size_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -44,7 +44,7 @@ ACE_Control_Block::print_alignment_info (void)
ACE_LIB_TEXT ("Sizeof long: %d\n")
ACE_LIB_TEXT ("Sizeof double: %d\n")
ACE_LIB_TEXT ("Sizeof ACE_MALLOC_ALIGN: %d\n")
- ACE_LIB_TEXT ("sizeof ACE_MALLOC_PADDING: %d\n")
+ ACE_LIB_TEXT ("Sizeof ACE_MALLOC_PADDING: %d\n")
ACE_LIB_TEXT ("Sizeof ACE_MALLOC_HEADER_SIZE: %d\n")
ACE_LIB_TEXT ("Sizeof ACE_MALLOC_PADDING_SIZE: %d\n")
ACE_LIB_TEXT ("Sizeof ACE_CONTROL_BLOCK_SIZE: %d\n")
@@ -79,7 +79,7 @@ ACE_Control_Block::dump (void) const
nextn = nextn->next_)
nextn->dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("freep_ = %x"), (ACE_Malloc_Header *) this->freep_));
+ ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("freep_ = %@"), (ACE_Malloc_Header *) this->freep_));
this->base_.dump ();
ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("\nMalloc Header:\n")));
@@ -148,10 +148,10 @@ ACE_Control_Block::ACE_Name_Node::dump (void) const
ACE_TRACE ("ACE_Control_Block::ACE_Name_Node::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("pointer = %x"), (const char *) this->pointer_));
- ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("\nnext_ = %x"), (ACE_Name_Node *) this->next_));
+ ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("pointer = %@"), (const char *) this->pointer_));
+ ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("\nnext_ = %@"), (ACE_Name_Node *) this->next_));
ACE_DEBUG ((LM_DEBUG,
- ACE_LIB_TEXT ("\nname_ = (%x, %s)"),
+ ACE_LIB_TEXT ("\nname_ = (%@, %s)"),
(const char *) this->name_,
(const char *) this->name_));
ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("\n")));
diff --git a/ace/Malloc_T.cpp b/ace/Malloc_T.cpp
index 5af3b5c8ebc..44a4a43c03c 100644
--- a/ace/Malloc_T.cpp
+++ b/ace/Malloc_T.cpp
@@ -133,8 +133,7 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
this->memory_pool_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("cb_ptr_ = %x"), this->cb_ptr_));
- ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("cb_ptr_ = %@\n"), this->cb_ptr_));
this->cb_ptr_->dump ();
#if defined (ACE_HAS_MALLOC_STATS)
if (this->cb_ptr_ != 0)
@@ -162,7 +161,7 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::print_stats (void) const
currp = currp->next_block_)
{
ACE_DEBUG ((LM_DEBUG,
- ACE_LIB_TEXT ("(%P|%t) ptr = %u, MALLOC_HEADER units = %d, byte units = %d\n"),
+ ACE_LIB_TEXT ("(%P|%t) ptr = %@, MALLOC_HEADER units = %d, byte units = %d\n"),
currp,
currp->size_,
currp->size_ * sizeof (MALLOC_HEADER)));
@@ -210,7 +209,7 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::open (void)
-1);
else if (first_time)
{
- // ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("(%P|%t) first time in, control block = %u\n"), this->cb_ptr_));
+ // ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("(%P|%t) first time in, control block = %@\n"), this->cb_ptr_));
MALLOC_HEADER::init_ptr (&this->cb_ptr_->freep_,
&this->cb_ptr_->base_,
diff --git a/tests/Malloc_Test.cpp b/tests/Malloc_Test.cpp
index f0777f466ab..9db02e7c260 100644
--- a/tests/Malloc_Test.cpp
+++ b/tests/Malloc_Test.cpp
@@ -352,8 +352,8 @@ ACE_TMAIN (int argc, ACE_TCHAR *[])
ACE_ASSERT (data != 0);
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("(%P) PARENT allocator at = %x, ")
- ACE_TEXT ("data allocated at %x\n"),
+ ACE_TEXT ("(%P) PARENT allocator at = %@, ")
+ ACE_TEXT ("data allocated at %@\n"),
myalloc,
data));
myalloc->dump ();
@@ -362,13 +362,17 @@ ACE_TMAIN (int argc, ACE_TCHAR *[])
ACE_Process p;
pid_t pid = p.spawn (options);
- ACE_ASSERT (pid != -1);
+ if (pid == -1)
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"),
+ ASYS_TEXT ("spawn")), 1);
parent (data);
// Synchronize on the exit of the child.
result = p.wait ();
- ACE_ASSERT (result != -1);
+ if (result == -1)
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"),
+ ASYS_TEXT ("wait")), 1);
ACE_ASSERT (myalloc->ref_counter () == 1);
myalloc->remove ();
ACE_END_TEST;
@@ -385,8 +389,8 @@ ACE_TMAIN (int argc, ACE_TCHAR *[])
ACE_ASSERT (result != -1);
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("(%P) CHILD allocator at = %x, ")
- ACE_TEXT ("data allocated at %x\n"),
+ ACE_TEXT ("(%P) CHILD allocator at = %@, ")
+ ACE_TEXT ("data allocated at %@\n"),
myalloc,
data));
myalloc->dump ();
diff --git a/tests/Mem_Map_Test.cpp b/tests/Mem_Map_Test.cpp
index a483c3541e7..a9e4b9054c0 100644
--- a/tests/Mem_Map_Test.cpp
+++ b/tests/Mem_Map_Test.cpp
@@ -44,7 +44,7 @@ reverse_file (ACE_HANDLE file_handle,
if (array[i] == '\0')
array[i] = '\n';
- while (--i >= 0)
+ while (i-- > 0)
{
if (array[i] == '\n')
{